[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Programming Languages
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 216
Thread images: 10
File: 1445575559983.jpg (198 KB, 1120x1144) Image search: [Google]
1445575559983.jpg
198 KB, 1120x1144
ITT: Things you love and also hate about your favorite programming language.

>C
>There are a million different versions of printf
>Fuck there are so many different printf functions goddamn, there's one for every possible usecase this is awesome
>Wait why are there so many goddamned printf functions
>Fuck
>>
>>52600412
>programming in C
>using printf
What are you programming?
>>
*
>C
>Fuck
>>
>>52600412
>Javascript
>it aways gets /g/entoomen triggered when mentioned
>it aways gets /g/entoomen triggered when mentioned
>>
>>52600425
nothing in particular
its just
its cool that you have printf, fprintf, fwprintf, vfwprintf, vsprintf, vsnprintf, vprintf, and so on
but that's a lot of fucking printf functions
>>
there's only 1 printf function retard.
>>
File: ss20151212at11.48.42.png (291 KB, 474x520) Image search: [Google]
ss20151212at11.48.42.png
291 KB, 474x520
>C
>Pointers are fucking cool
>The language can be call-by-value or call-by-reference, your choice
>Java didn't have these, this is so neat
>Wait
>Pointer aliasing, mutability, invalid pointers, memory management, void pointers, pointer arithmetic, mistyped pointers
>Pointers are not fun anymore
>>
>>52600412
C

I love that it's close to the metal and there is no mountain high stack of imbecile tier "abstractions" that force you to build layer upon layer of bullshit hacks that no one is going to understand in the long run. And I love that if that is what you actually feel like doing, you can do just that.

What I absolutely fucking hate is macros. Who ever found them a good idea deserves to get shot in their fucking face repeatedly forever.
>>
>>52600531
>printf
>fprintf
>fwprintf
>vprintf
>vfprintf
>vfwprintf
>vsprintf
>vsnprintf
>sprintf
>snprintf
>swprintf

There are a lot of fucking printf functions mate.
>>
>>52600572
macros were useful at one point but inline functions are x1000 better in almost every way

if only we could change the C Standard Library to use inline functions instead of macros like fucking puts()
>>
>>52600484
I rarely use any of the printfs at all when I use C.
>>
>>52600681
>if only we could change the C Standard Library to use inline functions instead of macros like fucking puts()
Then you would also have to change the standard and existing compilers as the "inline" keyword is no guarantee that the compiler actually inlines the function.
>>
>>52600543
C doesnt have references
>>
>>52600754
Pointer types are references anon. Otherwise it would make no sense that you can "dereference" a pointer or take the "reference" of a variable and store it in a pointer.
>>
I don't browse /g/ a lot but I keep seeing commotion about Java, why is it disliked so often?
>>
>>52600577
>fprintf
>...
fprintf is not printf. It's impossible to have multiple C symbols with the same name in a library.
>>
>>52600795
poo in loo
>>
>>52600795
Because it forces OO on you.
Some retards thought that everything is most easily modeled by objects with methods. Turns out they were fucking dense.
>>
>>52600412
>Go
>Static linking, easy cross-compiling
>Memory-safe, GC
>Compiling from source to binary usually takes less than two seconds
>Decent performance for its target uses

>GC
>Militantly simple
>heug binaries
>Google
>
if err != nil { …

>muh web framewerks
>so many nice advances in programming languages deliberately omitted
>>
>>52600910
So I do software engineering at school and I learned by doing OOP only although they never taught or told us the disadvantages of it, mind telling me?
>>
File: 1400028116987.jpg (38 KB, 486x357) Image search: [Google]
1400028116987.jpg
38 KB, 486x357
>>52600795
>I don't browse /g/ a lot but I keep seeing commotion about Java, why is it disliked so often?
Because Java is kinda hard but not really. It's pretty performant and powerful, but it's also really big and its standard library is fucking colossal. Also, it's garbage-collected so you don't have to worry about memory management but the garbage collector creates performance overhead. It compiles into an intermediate bytecode that runs on any platform with the JRE, so its imeediately portable as well.

As a result, it's a mildly complex language that performs kinda okay compared to fully-compiled languages but is 10x faster than any scripting language or interpreted language, and it's powerful but not super hard to use so it's basically baby-tier C++/C.

So, you have a lot of people that have been using Lua/Python/Javascript for 2-3 years that decide to learn Java as their first "real" language and they complain about C/C++ being "old" and "too hard" and post synthetic benchmarks showing that Java is just as fast as C++ while omitting the even-faster C.

Basically, lots of people learn the language as they get deeper into programming, making it very popular and breeding a community of new programmers and a small selection of incompetent assholes that refuse to learn anything harder than Java because it's "real" enough for them.

There's nothing wrong with Java, it's an easy language compared to C/C++ and has portable programs with good performance, so it's good for non-realtime applications and medium-sized games or large games that aren't heavy on memory usage. It's the people that use it that claim that it's the best fucking language to exist just because they don't want to learn C that are the problem.

tl:dr; Java attracts loud, stupid people but is otherwise fine
>>
>>52600998
Don't feed the trolls
>>
>>52600910
You're an idiot. You use Java when your problem domain is sensibly modelled as objects. If it's not, then don't use Java. Problem solved.
>>
>>52600910
>>52600998

Basically, OOP has the great advantage of making working in a large team really, really easy. No need to worry about spaghetti code, their are cleanly laid out boundaries between objects, private internal members that signify they shouldn't be touched etc. It also help you keep your code consistent in other ways, like interfaces/abstract classes, that enforce a standardized way of doing something.

None of these things are that useful as a solo programmer, but as a large team they are invaluable. There are also some areas, like game programming, where OOP is a very logical paradigm. Hating on OOP and Java is a c-fag meme.
>>
>>52600910
Modeling with objects is not all that bad. After all people were doing it before Java with say UML for instance. What is fundamentally broken is implementation according to the high and mighty ideals OOP is built around.

>>52600998
Looking back on your practice with OOP, how many of the principles did you actually adhere to? Did you use encapsulation like it was meant to be used? What about inheritance? Did you find it useful at all?
>>
>>52600973
I tried using Go once

>try to compile a simple OpenGL game
>includes a gorrillion standard libraries in the binary
>25mb helloGL.exe
>keep using it but eventually remember that its garbage collected and decide that im fucking done with it

They tried to replace C and said "let's address C's shortcomings, but then take away everything else that C did right so that our shitty interns can learn to use this language"

fucking Google
>>
>>52601021
>>52601084
>Hating on OOP and Java is a c-fag meme.

Hey, thanks man. I should've expected that desu.

>>52601095
>>52601095
>Looking back on your practice with OOP, how many of the principles did you actually adhere to? Did you use encapsulation like it was meant to be used? What about inheritance? Did you find it useful at all?

Honestly, they taught us to program that way and as assignments kept coming and going we just gave them our work like that.
If you'd do things your own way they'd ask you why but they wouldn't mind.
As for me, I guess one of the posts I responded to up here said that OOP is really useful for team programming but when making assignments or projects for school it felt pretty useless and more like a restriction because it felt like it was a rule, so pretty useless actually but it's by no means bad.
>>
>>52601021
>Java is just as fast as C++ while omitting the even-faster C
C and C++ should be almost identical in performance though. The only time C++ will perform worse in a benchmark is when you are doing things in a more complex way. If you just implement almost same code, replace printf with couts, don't use any new's etc, you should produce an almost identical binary even.
>>
>>52601100
CGO is awful for memory and compatibility, and most OpenGL shit is just bound to C.

It will never, EVER support a AAA game engine, but building network services and CLI-based utilities with Go is pleasant.
>>
>>52601153
>Hating on OOP and Java is a c-fag meme.
>Hey, thanks man. I should've expected that desu.
That maybe true on /g where the average poster is in fact a -fag, not a programmer, but in my experience, in the real world no one really likes OOP nor Java for that matter, regardless of their background or working language.
>>
>>52601021
>tl:dr; Java attracts loud, stupid people but is otherwise fine
>tl:dr; <any language> attracts loud, stupid people but is otherwise fine
>>
>>52601021
In short, Java is the embodiment of mediocrity in programming form and people who like Java have too much pride to admit and accept that Java is thoroughly mediocre. It's the right tool for some jobs but certainly not for everything but aforementioned pride means that Javafags get angry if anybody makes that assertion.
>>
>>52601218
Maybe. But compare the efficiency working with Java/C# in a large team compared with working in C. It's a lot harder for shitty programmers to sabotage your work in Java. People don't have to like it for it to have a use.
>>
>>52601218
I agree, I didn't enjoy using OOP ever but it feels like I need to when surrounded by others in school. However when at my internship, I didn't run into it a single time but I still programmed in the language and they appreciated it.
>>
>>52600722
but it can be very useful for debugging some math problems.
>>
>>52601263
I've worked in teams of up to 5 with Java, C++ and currently pure C. I have not noticed any advantage or disadvantage in team efficiency based on what paradigm the language is built around... if anything, I'd say working with procedural is actually easier and scales better (but this last point is very personal and can be disregarded as subjective)
>>
>>52600412
>Language
Ruby
>Like
The community
>Hate
The community
>>
>>52601161
I though C++ compiler could just compile C code.
>>
>>52601318
Yes sorta. But the languages are so similar, unless you use a language feature from C++ that isn't in C, you might as well be writing C code. The simplest possible hello world in both languages will likely only have one or two differences in the assembly instructions. Simple couts and simple prints work exactly the same way, arithmetic will work identically etc.
>>
>>52601084
>There are also some areas, like game programming, where OOP is a very logical paradigm

Except OOP wants you to think everything as arrays of structs while the CPU wants to chew on structs of arrays
This matters with games because they want to be fast.

Say you want to do stuff on object coordinates. You really want to touch only a small bit of data of each object. But if you lay out your data in the OOP way you're going to pull a lot of junk with each access. i.e polluting the cache with data that is not needed for this computation.

None of this mattered when memory access was pretty fast relative to CPU speed, but these days it does matter. You don't want cache misses that often.

Sure it might be logical. But enjoy your bloated slow engine.
>>
>C++
>Very powerful, versatile and flexible. Pretty neat language with the newer standards.
>Has quite some retarded shit due to decades of legacy crap
>Very verbose, too much typing (I'm lazy)
>>
>>52601390
>The simplest possible hello world in both languages will likely only have one or two differences in the assembly instructions
I suggest you check out the difference before claiming there will be one or two. There are a lot and C does a remarkably better job there.
>>
>>52601434
Now this is one point where "encapsulation" gets completely blown the fuck out the window. Sure, it's still nice to think of your game in terms of objects (I would say it's actually the most natural thing to do), but if you modify a lot of objects and the objects need to modify each other then trying to pretend you're still doing OOP is just a lie.
>>
>>52601161
Yes, but you're basically saying C++ is as fast as C if you write C instead of C++

For most non-trivial programs well-written C++ looks very different from well-written C. If your C++ code uses none of the paradigms distinguishing it from C, you are better off writing C in the first place. Non-trivial, idiomatic C is usually faster than non-trivial, idiomatic C++ but the speed difference is usually small enough that the ease of programming using abstractions offered by C++ is worth it.

In other words don't get fooled by the idiom "C/C++". They are rather different languages and should be treated as such.
>>
>>52600572
There isn't a single non-trivial C program that can't be described accurately as a mountain high stack of imbecile tier layers upon layers of bullshit hacks that no one is going to understand even in the short run.
>>
>>52601774
Don't be so negative. I'm sure you can find at least one.
>>
>>52601814
I tried real hard during this period of my life where I was into low-level languages and didn't want to move to GC'd, abstracted languages. I couldn't find a single one.
>>
>>52601833
FreeRTOS is fairly straightforward and all the abstractions make perfect sense. It's also non-trivial though I'm unsure where that border should be drawn.
>>
>C++
>compilation times
>lack of modules
>still no native networking/filesystem libraries
>>
>>52601932
>native networking/filesystem
For what purpose?
>>
C#

Pros:
>C like syntaxis
>Cross platform runtime

Cons:
>License hell

Swift

Pros:
>I feel happy writing on it
>Fast
>Open Sausage

Cons:
>Apple
>Apple?
>Whos gonna take this shit seriously?
>>
>>52601983
Writing more than a Hello World?

Not only that, there is neither a native threading library
>>
>>52602133
OK, but let's take network programming as a concrete thing. What limitations do you feel are there from lack of a native library? And what would a native library enable you to do that say sockets are unable to...
>>
>>52601865
>50 #define X const
>struct a {...} b; typedef c b; all over the place
>prefixMoreprefixWhyTheFuckIsThisCamelCase-tier names everywhere
>half of which are macro functions
>#define dicks -1 #define make_dicks dicks everywhere
Yeah, nah.
>>
>>52602203
This is the kind of people who browse your /g/, gentlemen!
>>
>>52602203
I would say cross platform development
>>
>>52602422
Anon, those are not abstractions, but I agree, some of the macro magicks does look like complete dildos. Don't really follow the hate towards constant definitions nor typedefs...
>>
>>52602437
>can't even answer a simple question
This is the kind of people who browse your /g/, gentlemen!
>>
>>52602480
They are abstractions. The whole point is to make concepts look like they're other concepts "without revealing their true nature". That it's done with macros instead of something else doesn't matter. Everything in that post was pointing out places with overabstractions. For example, you could remove the typedef and just fix the struct name. You also obviously don't need to name the "struct" (struct {...} actual_thing, not struct niggers {...} irrelevant and then typedef faggots irrelevant).
>>
C++:

+ RAII, type inference, generics, stdlib containers with built in memory managerment, top quality external libraries out the ass for everything possible involving a computer

- The fact I've been deliberately avoiding it for the past decade and have grossly misestimated how pleasant it is to use.
>>
>>52602555
I would say an abstraction hides away detail not just renames something into how ever vulgar you want to go.
>>
>>52600577
but they don't do the same

look them up please
>>
>>52600412
>Haskell
>You can write elegant, concise, and clear code easily in it
>Code that looks nice to humans is usually inefficient for computers to execute, say goodbye to your RAM
>>
>>52602640
That's literally what the typedefs and defines do.
>>
>>52601538
The differences in the actual main block of the program are really small though. You have some extra boilerplate setting up static objects, because C++ is oop, but that doesn't increase or change at all no matter how complex your logic is. I bet if you didn't use cout, that boilerplate would shrink. If you use printf instead of cout, change the include, and you have your C program. Compile it as c++, which works, it doesn't just treat it as C, because it does create a name mangled version of main, and guess what? The assembly is identical.
>>
File: uwuuuu.png (81 KB, 194x162) Image search: [Google]
uwuuuu.png
81 KB, 194x162
>>
File: uwuuu.png (30 KB, 84x116) Image search: [Google]
uwuuu.png
30 KB, 84x116
>>
>>52600412
Wait til you know that printf is Turing complete...
>>
>>52602568
C++: not a bad language to use, but for anything modern the tooling is still pretty annoying. You have not seen pain until you've tried to debug a mismatch between standard language headers and the compiler's support library; they're an exactly matched pair.

>What the fuck is this going wrong for?! Where does the code do that? Why does this work for other people? Fuuu...

No other language is nearly this bad. Most don't separate the ideas so much, and C is more lenient.
>>
>Haskell
>strings vs text vs lazy text
>IO functions don't return (MonadIO m) => m
>>
>>52600543

Java is call by value just every variable is basically a reference pointer rather than an actual memory pointer as you can implement in C

It'll still evaluate reference variables in a call if im not mistaken
>>
>Clojure
>atoms, refs, agents, promises, futures, delays
>runs basically everywhere
>muh lisp
>>
>>52604257
what you mean
Data.Text?
I've never used it, what does it offer that [Char] can't?
lazy text?
as for the last point, does it bother you that you need (>>=) for quick IO unpacking
>>
>>52604770
Just use scheme.
>>
>>52604982
Lazy text is basically syntax for
\x -> "some extremely long string that shouldn't be allocated before it is needed"

I think.
>>
>>52605376
Scheme was my first Lisp, but I have to say that Clojure is actually a better language. I do miss call/cc, though.
>>
>>52605707
>no TCO
>slow as balls
>jvm
>>>/trash/
Does it even have hygienic macros?
>>
>Objective C
>Don't have to look at function declarations for parameter order/types.
>Objective C runtime header lets you do some fun shit

>Fucking Xcode
>>
>>52605815
>no TCO
That's what recur is for.

>slow as balls
Startup time is slow, but for an application like a webserver that isn't a big deal. Further, the builtin concurrency primitives will help enable faster development of __fast enough__ programs.

Macros are hygienic. See https://xivilization.net/~marek/blog/2013/09/17/clojure-and-hygienic-macros/ for more details.
>>
>>52606048
Too bad about the garbage syntax, awful debugging experience, and shit java-tier verbosity when using java shit.
>>
>>52606019
Obj-C is really nicely suited for UI work too, unlike C and C++. It's super cool to have a single method that a menu item, a button, and a callback call any within the method being able to know exactly what called it and then being able to respond appropriately.
>>
>>52606096
>garbage syntax
It's the usual lisp syntax, I think it's quite nice.

>awful debugging experience
IMHO Java's stacktraces are the most useless pieces of shit for any sufficiently advanced program. That being said, using Emacs with cider is very nice. Most of the time cider will take you to the exact line any errors occur at. Also, you can always fire up a debugger and debug that way. In short, debugging isn't amazing, but it also is possible and not terrible. You should be writing unit tests, so it should be fairly obvious where any error occurs anyway.

>shit java-tier verbosity when using Java shit
Well, Java is a bad language and Clojure interacts with it. The unfortunate reality is that a lot of places have seriously invested in Java technologies and can't afford to abandon existing projects. You should __always__ create a wrapper when using Java code from Clojure that abstracts away the horrible syntax. This Java interop has allowed big businesses like Walmart to adopt Clojure (http://blog.cognitect.com/blog/2015/6/30/walmart-runs-clojure-at-scale).

So you see a problem, I see a competitive advantage.
>>
>>52606048
>fast enough
I hate the everliving shit out of this term because it's at least partially responsible for software performing exactly as it did (or worse) than it did 20 years ago despite hardware having become hundreds or thousands of times more capable. I also hate it because it implies settling.

There is absolutely no reason that performance and efficiency should be shrugged off like that when there's so much low-hanging fruit when it comes to potential optimizations.
>>
>>52606223
>It's the usual lisp syntax
No, it uses a lot of ill-placed () or [] and .... garbage.
>>
>>52606277
You could take 10 years to work on some shit software that will be deprecated a year into your effort by large google teams (but hey, it'd be fast!), or you could take a month and you'll be fast enough.
>>
>>52606312
OR you can put out something runs decently and iterate and make performance a point of concern in those iterations. Hell, dedicate a few engineers to optimization. Just do *anything* but outright ignoring that the thing runs like dogshit pretending that throwing more hardware at it to make up the difference is an acceptable solution.
>>
File: desktop 1_011.png (728 KB, 1366x768) Image search: [Google]
desktop 1_011.png
728 KB, 1366x768
>Thread about things that you both love and hate from a language
>fucking retards posting pros and cons of their languages of choice
>>
>>52602133
there is <thread> now, wihch makes the code portable, you still have to link with the corresponding system thread library but I dont see anything wrong with that.
>>52601932
>>52602133
If this things are so important you could sent a draft of a networking library to the cpp comitee or even more, see if there is a draft already and start contributing.
>>
>>52606355
>a few engineers
My fucking sides.
>>
>>52601095
Java doesn't even subscribe in whole to OOP ideals.

The fact that primitive types exist at all are telling enough.
>>
>>52606499
Might not be realistic in the industry at large but it's how I'd run a company. Engineering-first with a focus on quality. Doing it any other way in a company that relies heavily on technology creates colossal waste, even if management doesn't realize it. It creates debt that WILL come back around and bite the company in the ass.
>>
>>52601661
I started out game programming, and desu when most of your operations are many-to-many mutually destructive updates, OOP is of zero help
especially since most languages go out of their way to make that kind of thing difficult or impossible
>>
>favorite language
Ruby
>like
Ease of use, standard and coherent syntax, every possible operation is well-defined semantically within the confines of the language
>dislike
There's. No. Compiler. Not even a JIT. Even python has a JIT. The most I can get is distributing the interpreter along with the code in a packaged runnable.
>>
>>52606575
I haven't laughed that hard in a while. You're a real clown, you know?
>>
>>52606575
>many-to-many mutually destructive updates
>>
>>52606686
>The most I can get is distributing the interpreter along with the code in a packaged runnable.
Even most JITers don't allow this: Pypy, LuaJIT, Java
>>
>>52606688
He's entirely right.
>muh visitor pattern
>>
>>52605815
>hygenic macros are a good thing
>>>/trash/
>>
>>52606878
My sides are moving on their own now! Do you come from a long line of buffoons?
>>
>>52600412

>QBasic

>nice and clean code
>comes with IDE for game development

>not many job opportunities
>>
File: 1447459739194.jpg (52 KB, 376x419) Image search: [Google]
1447459739194.jpg
52 KB, 376x419
>>52606969
You always do this. Just shitpost... Shit isn't funny, it's pathetic.
>>
>>52606277
>>52606277
Premature optimization is undesireable. What you are saying makes no sense -- either software meets its requirements or it doesn't, hence the phrase "fast enough." Programmer time is worth more than machine time.
>>
>>52606281
Yes, there are lots of parenthesis. That's because clojure is a lisp dialect. [] is syntactic sugar for vectors. Clojure also supports maps and sets out of the box. It makes programming much easier, as its minimal syntax stays out of your way.
>>
>>52608485
>killing the cleanliness of lisp syntax is lispish unlike adopting proper lisp syntax idioms
OK kid.
>>
I hate every language.

>Python is easy to use but runs slow
>Java uses nothing but libraries thrown together into a foreign language.

Should I just learn C++ or am i too retarded for that as well?
>>
>>52608525
OCaml is easy to use and fast as shit.
>>
>>52608508
Clojure is quickly becoming the most widely used Lisp in the enterprise (if it isn't already) and is Lisp's best shot of ever making it mainstream. You can continue bitching about petty points, but the fact is that a programmer can be more productive in Clojure than any other Lisp. It makes it possible for a total idiot to build robust and scaleable code. I don't really need to say anything more positive about it -- but I would encourage you to learn the language instead of judging it based on limited superficialities. You'll discover that Clojure is the most advanced language to date, and is delightful to use.
>>
>>52608563
[shilling intensifies]
>>
>>52600412
Love
>Using printf
>Saying 'Fuck'

Hate
>Nothing much
>>
things I hate about c:
>no polymorphic functions
>no generics
>limited meta programming facilities
>functions that have a type signature of
int change_ye_ptr(void **screw_thread_safety);

Things I like:
>pointer arithmetic
>flexibility
>throwing out function pointers
>simple enough to completely understand
>>
File: js.jpg (8 KB, 200x200) Image search: [Google]
js.jpg
8 KB, 200x200
>javascript
>first class functions
>extremely versatile programming styles
>very minimal and pleasant syntax
>excellent code importing model (npm)
>/g/ hates on it because of memes
>It's pretty fast, but I wish it was faster
>>
>>52609516
I hate it because how people abuse of it.
No, you don't fucking need it in your webpage.
>>
things i like about c:
no generics
no oo required (simple objects are perfectly fine but it discourages abstractfactoryabstractfactory)
allows goto

dislike:
not enough explicit control over the compiler optimizations.
having to work the c++ libraries
>>
>>52609516
you are deluded.
>>
>>52600412
>C++
Love:
- Syntax is clear and simple
- Multiple ways of doing things that are better in different situations (like voids and lambdas) (Multi-paradigm)
- std::thread, std::algorithm
- Sane strings over C
- Iterators

Hate:
- Using headers. I hate how I can't just include a .cpp file and have it act as if it's just part of the same .cpp file.
- Int main doesn't have args as vectors<string> as an option
- Not is fast as C or asm, despite being one of the faster languages.
>>
>>52609763
And you don't properly understand the language. :^)
>>
>>52608563
How does it compare to Scala?
>>
>>52601468
Why don't you try D?
>>
>>52609867
>- Using headers. I hate how I can't just include a .cpp file and have it act as if it's just part of the same .cpp file.
but you can
The symbols will exist in the compilation unit, so you don't have to/can not compile the file on its own for the same linked executable
>- Int main doesn't have args as vectors<string> as an option
wrapping it isn't really a problem though
The biggest problem here is how to get the std::string to not copy but just use a
const char *
inline, which might not be intended, but should be possible
>>
>>52609867
>I hate how I can't just include a .cpp file and have it act as if it's just part of the same .cpp file.
absolutely disgusting
>>
>>52600412
Mesa
>it is better than C
>a compiler doesn't exist
>>
>>52601932
C++ is supposed to be platform independent.
Networking and filesystems are not.
Use the framework/toolkit of your choice for these functions.
>>
>>52603127
>>52600412

On that note:
>Haskell
>awesome code
>so much productivity
>speed too (if you know what you are doing)
>no bugs
>quickcheck leaves any unit testing framework in the dust on another planet
>formal verification easily possible.
>so many academic papers describing so many interesting things with haskell

But:
>C++ made me feel like a total noob for ~a year, Python for about 2 month. With Haskell after 5 years I still feel like a hack. Seems like everyones ideas are more elegant than mine and their sourcecode looks just so sexy.
>>
>>52600778
reference and pointer are synonyms, aren't they?
>>
>>52613838
Not in C++,
>>
>>52601021
Let me add one or two things on what you said.

Ask someone that likes java why he likes it, and if he know why we say it's a bad language we won't be able to answer you, because he don't know a shit about this language. Often he is the one that will tell you C and C++ are too difficult for nothing since with java "it just werks". Sometimes you'll have the "if java is such a shit why is it pick by so many people?"
People that choose to create something in Java are often stupid people that can't into real programming. And because of those people we end with programs like android. Who the fuck thought java was fucking good idea for a smartphone OS ? Even for an OS ?
All the good programs that you use daily are made with C and C++, and there is a reason for that.
>>
>>52609867
>- Using headers. I hate how I can't just include a .cpp file and have it act as if it's just part of the same .cpp file.
go kill yourself man.
>- Int main doesn't have args as vectors<string> as an option
twice please
>>
>>52601986
Yeah I really enjoy writing swift.
Hopefully it will become more widely used with Swift 3
>>
>>52609867
>- Not is fast as C
Faster if you're not retarded.
>or asm
It's virtually impossible to write faster asm than your compiler can generate.
>>
>>52609867
Speed isn't everything for a language. All software has requirements -- if a solution is a little slower than another, but it still fits in with the performance requirements, then it's fine. Considering that most of a programs development cost end up in maintenance, choosing a maintainable language with a little overhead generally is far better than writing something in C just because "muh speed."
>>
>>52614240
Plus, using C is asking to be pwnd, since it's virtually impossible to write secure C code.
>>
>>52613945
>All the good programs that you use daily are made with C and C++, and there is a reason for that.

7/10 bait
>>
>>52614240
C has slowed down the progress of computer science for 40 years with the "muh speed" excuse.
>>
>>52614400
The worst is that it was really slow when it was fist introduced. So it was unsafe while its contemporaries were safe, and it was slow as shit while its contemporaries were quite fast.
>>
>>52614414
>The worst is that it was really slow when it was fist introduced. So it was unsafe while its contemporaries were safe, and it was slow as shit while its contemporaries were quite fast.

Also it's the source of most computer vulnerabilities. If C wasn't so popular we would have bounds checking in hardware by now.
>>
>>52614342
tell me one program on your computer that require java.
>>
>>52614052
>It's virtually impossible to write faster asm than your compiler can generate.
But there are quite a few things where handwriting can be faster than the compiler
Compiling code and later hand optimizing can be faster, but wont ever be worth it

>Faster if you're not retarded
And the person who wrote the C code is

Generally C is faster, but there are problem domains where C++ will just be way easier to use for writing the code so the C code wouldn't be optimized and thus slower
>>
>>52614270
>it's impossible to write secure code in a managed language
where "secure" is something like AES implementation which also has side-channels in mind
>>
>Racket
>It's not C
>It's not C
>>
>>52614550
>what is rvr
>what is move semantics
>what are templates
You don't know shit, kid.
>>
>>52614578
Cmen everybody! Yes, they're THAT incompetent!
>>
>>52600412
>Wait why are there so many goddamned printf functions
There's only one mate. I think you're confused.
>>
>>52614535
>tell me one program on your computer that require java.

Is this relevant to the discussion?
>>
>>Java


>>Millions of teenage wannabes shit posting on the internet about verbosity, despite never having written so much as "Hello World" in Java.
>>Extra syntax, most of which is handled by the IDE anyway, is not even close to a metric by which you judge the merits of a programming language or environment.
>>
>>52614779
>>what is rvr
That I actually don't know
>>what is move semantics
Something that got necessary since old C++ copied all the time which was shit
So now idiomatic C++ can doe what C did all the time
>>what are templates
Easy way to write multiple code paths in a nice way
They are a trade off binary size/performance. The same is achievable in pure C with mostly copy pasted functions, which is purely worse
>>
Common Lisp
>format
>format
>>
>>52613945

This is the most low information post I've seen in a long time.
>>
>>52614962
>So now idiomatic C++ can doe what C did all the time
>The same is achievable in pure C with mostly copy pasted functions
C literally can't do that. Never has, never will. As expected from the cmen, talking out the ass 24/7
>>
>>52614786
managed as in python/java/C#/Haskell, not something like scheme/lisps
The problem is garbage collectors and other runtime interupt things make it impossible to write security related code
Another issue can be immutability of strings, so it may not be possible to overwrite secrets that are not needed any more
>>
>>52615004
Lisp-2s are so disgusting, but there isn't a single usable lisp-1.
>>
>>52615079
My sides are on fire!
>>
>>52615066
give an example of what you can do with move semantiks that's impossible with C.
Mind you, not ugly/more verbose but actually impossible.
>>
>>52615131
Defining a move constructor. Are you clinically retarded or something? It's literally impossible to do anything even remotely related to that in C.
>>
>>52600459
you mean java, not javascript
I dont think you are a real programmer
>>
>>52615131
Not him but
If you go by that petric, it was probably doable in B, BCPL, PL/I, Algol and Plankalkül too
>>
>>52615081
>he's not using Chicken
>>
>>52615157
which allows nothing new over C.
defining a move constructor is just another operator overloading.
It is basically
operator=(whatever type, r-reference)

So just syntactic sugar around
move_whatever_you_call_it(type *, type *)

(hint: I don't know the exact types that are allowd on the left side of the move constructor)
>>
>>52615098
If you ever try do to some security related code in a language with immutable (byte)strings or one that used a gargabe collector you really shouldn't be allowd to do security related code
>>
>>52615233
>no 64-bit or higher values
>green threads only
>>
>>52615237
>r-reference
Which C doesn't support. Kill yourself retard.
>syntactic sugar around
Top fucking kek. Clinical retardation confirmed.
>>
>>52615253
You should breathe the helium in. It would be the only time you would've been correct about something in your sorry existence.
>>
>>52615270
>>no 64-bit or higher values
>what is bignum
>>green threads only
>what is mpi
>>
>>52609548
good luck covering your clients use cases for a web application without javascript.
protip: you can't
>>
>>52615316
>multiprocessing
>viable
>2016
>using strings to represent 64-bit numbers
>unironically
>>
>>52615291
so you think there is no problem for code to leek secrets every time since they cannot be overwritten?
Or for the runtime to do something which may or may not be triggered on purpose allowing for all kind of timing attacks.
>>
>>52615326
Your clients being fucking morons doesn't mean that it's required.
>>
>>52615326
js_of_ocaml
>>
>>52615282
you really think (r-)reference are something different form a pointer with some amount of compiler support and typing?
>>
>>52615332
>memes
ok kid
>>
>>52615341
You are bar none the most retarded poster I've ever seen on 4chan in 10 years. Congratulations.
>>
>>52615359
>r-values are just l-values gais
>y u no tak me srs?
>listd 2 me ;_;
>>
>>52615361
>get #TOLD
>if I say "memes" I win, r-right?
Classic.

I agree that chicken is the best scheme, but. It's still unusable for real-world programs.
>>
>>52615349
>says you don't need javascript on your webpage
>refers to a javascript compiler
wew lad
>>
>>52615401
It's all because of the corporate shitheads. If it weren't for them, what is now known as javascript would be a lisp dialect.
>>
>>52615400
ok kid
>>
>>52615384
learn to read

I never said that r-values and l-values are the same.
I didn't even say that r-references and l-references are the same.
The both are better typed pointers with some compiler support, but the have different semantics, both of which are mostly syntactic sugar or guarantees (e.g. can't be Null).
>>
>>52615412
fair point, I agree, however that does leave us in a position where we 'need' javascript, also ECMAscript isn't a LISP dialect.
>>
>>52615446
>lrn2read I didn't say r-values are l-values
>I just said r-values are l-values
Keep posting, it's always a laugh!
>>
>>52614535
Any jetbrains ide.
>>
>>52615421
>ok kid

I have a dejavu
>>
>>52615514
>having a jetbrains ide
Please picture an image with a blue background and a metal grille in the back. Costanza is making that face in the foreground.
>>
>>52615421
Alright child.
>>
Haskell
>perfect string type for every task
>fucking 6+ combinations of string types

>many high-quality libraries
>until you find something that's simply not there

>sweet syntax and GHC extensions
>GHC guys just went crazy and now are implementing dependent types

>free monads, the new cool thing sound nice
>nobody realizes this shit is going to be REALLY slow

>>52604982
>lazy text?
Data.Text.Lazy is pretty much [Data.Text], i.e., chunks of strict text

Strict text is a packed array of unicode characters, which is infinitely more efficient than crappy [Char] (both on memory and cpu usage)

>as for the last point, does it bother you that you need (>>=) for quick IO unpacking
I think you should read about MonadIO. It's pretty much MTL-style IO.
>>
AutoIt
>I can write small scripts and tools extremly fast
>Otherwise its completly shit
>>
>>52615582
Actually, quality of library is what haskell doesn't have, unlike quantity. There's easily 2-3 libraries for any one task you can think of, but they're all shit and only usable in toy programs. Either they simply don't have the tools required to do more, or they perform like absolute dogshit so only miniature programs don't blow up on them.
>>
>>52615607
I've been developing a sixth sense to choose the "good" library. What low-quality library did you find without an alternative?
>>
>>52615633
accelerate/obsidian and ad for instance.
>>
>>52615475
7/5 made me check the standard

You really don't have an Idea what you are talking about.
>>
>>52615863
>he's still posting
C-ucks are really desperate for some cmen.
>>
I FUCKING LOVE that English has works like FUCK.
I Hate French for sounding like a pancake language - it's crepey.
>>
>>52615860
I thought accelerate was considered a great library (albeit overengineered)

What's wrong with ad, btw?
>>
>>52615157
C doesn't need move semantics because C doesn't make implicit copies all over the place.
It's purely a fix to C++'s retardeness of calling copy constructors all the time.
>>
>>52615966
>programming language
>>
>>52615984
ad doesn't scale at all and is very hard to augment with custom datatypes that aren't number-like.
Accelerate with the cuda frontend is slow compared to modern cuda and C/C++ wrappers/generators. With the opencl frontend, it's outright unusable.
>>
>>52616047
>C doesn't make implicit copies all over the place.
My sides! My fucking sides!
Please, please don't stop posting!
>>
>>52616105
Oh, wow. That's a bit depressing desu

Any other library I should be aware of?
>>
>>52616151
The fuck is that "desu" doing there?

s/desu/to be honest/

[also this is a test desu]
>>
>C#
>.NET has more or less everything I need
>VS2015 is pretty damn incredible
>WPF and WinForms are baller
>Monodevelop exists

>VS2015 is bloated as fuck
>Basically just Java
>Win32 programming
>>
>>52616202
>WinForms
deprecated
>Monodevelop exists
can't into WPF
>>
>>52616119
You don't seem to have a clue what you're talking about.
>>
File: 1453015280043.jpg (189 KB, 720x658) Image search: [Google]
1453015280043.jpg
189 KB, 720x658
>>52615966
"Merde" does the job just as well senpai
>>
>>52601986
Linq is also fucking amazing, does Java have an equivalent for dealing with databases and doing functional programming?
>>
>>52616218
>Winforms
>Stills works on anything ever made ever
>Deprecated

I still use the occasional winforms feature in WPF.
>>
>>52616248
or “putain”. Might be even closer to “fuck”, literally speaking.
Actually, French may have a way larger vocabulary than English as regard swearings.
>>
>>52616279
>it's not deprecation when I can still use it without any problems
Go look up the definition of "deprecation", genius.
>>
>>52616248
merde doesn't do as well since it doesn't have an as hard pronounciation
>>52616285
from what I remember from my french classes the same should apply to 'putain'
>>
Kotlin
>Runs on the JVM, native access to java libraries
>"Modern" static typing, amazing tooling since made by jetbrains
>Great macro support, DSL are a breeze to make
>Everything you could expect from a present-day language
It's like a concise java with modern features stolen from functional languages

But
>Still not 1.0
>Annotation processing is terribly bad
>>
Haxe
>Compiles to like 20 different other languajes
>Young languaje so some obvious shit is not yet implemented.
>>
>>52615412
>javascript would be a lisp dialect.
It would have been a Lisp dialect with JavaScript's semantics, if that's not just a myth to give Eich more cred among the hipster crowd.
>>
>>52616765
>2005
>Young
>>
>>52616492
>GC
>2016
It's shit. Linear types or bust.
>>
>>52616492
>stolen from functional languages
*stolen from Algol family languages
>>
File: 1453508238734.png (107 KB, 323x241) Image search: [Google]
1453508238734.png
107 KB, 323x241
>>52609516
>It's pretty fast
>>
>>52617302
>what is v8
>>
>>52613945
you're pretty dumb my friend
>>
>>52617333
slower than fucked fuck
Thread replies: 216
Thread images: 10

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.