6 ms·
> It feels like it's becoming a simpler language, as in many cases, it takes much less effort to tell the compiler what I want to say. I do not think this show
by badsectoracula 4y ago
> It feels like it's becoming a simpler language, as in many cases, it takes much less effort to tell the compiler what I want to say.
I do not think this shows that Java is a simpler language, if anything it shows that it has more features (ie. being more complex as a language) that make it easier to match what you want to do.
Java might be simpler (easier) to use, but that doesn't make it simpler as a language itself.
For a more extreme example take C vs C++ - C is certainly simpler as a language than C++ and nobody would ever claim that C++ has any relation to simplicity as a language whatsoever, but a lot of things are much simpler to do in C++ than they are in C because of all the additional features C++ provides.
- weatherlite 4y agoSo its semantics over the meaning of simple - some mean simple as in not meany features, the other means simple to get things done with. Many people call C a hard language because it's quite hard to get stuff done with it, while others call it simple because the feature set is small and writing compilers for it is relatively easy.
- flohofwoe 4y agoIMHO the reason why it's "hard" to get stuff done in C (which I don't necessarily agree with), is mainly the bare bones stdlib, less the language. Eg C programming is much more library-driven than language driven. It sucks if the used libraries suck (such as most of the C stdlib), but it is great when using libraries with a modern API design (eg the opposite of POSIX).
- weatherlite 4y agoFrom the perspective of most high level programming - say web development, C has no advantages whatsoever.
- astrange 4y agoHmm, every piece of web infrastructure I just thought of (every browser, nginx, FreeBSD, your HL language runtime, nghttp2, curl, SSL) is written in C. Sure, you may not be touching those during your web development, but that’s because you don’t know how to have fun and outsourced it all.
- weatherlite 4y agoweb infrastructure is not the same as web development...infrastructure is what allows developers and users to build and use the apps. C does make sense for these things. Stuff like Curl I think is written in C more due to historical reasons (Unix is written in C so all of its apps are in C), I don't see any major con if it was written in Python (which is a big high level wrapper over C in the end...) - it would be a tad slower and a bit more memory yeah, but in todays world I don't know how much of a difference it makes.
- _gabe_ 4y ago> I don't see any major con if it was written in Python > it would be a tad slower a tad? I'll use C++ as an example, but the last time I profiled a hash map in C++ vs C#, the C++ lookup took 1 nanosecond[0] and the C# version took 1ms (1000x slower) (I don't have these metrics anymore but I believe it was one ms or slower, and Google seems to confirm that). Now, if the difference between C++, a machine compiled language, and C#, a runtime compiled language, is 1000x for a very common operation, how much slower will an interpreted language that is running at an even higher level be?? The reason 90% of our apps are such slow trash these days is because programmers think that there is no difference in a couple milliseconds when it is a huge difference if that couple milliseconds is being run thousands of times through hundreds of thousands of lines of code! Take a look at how fast the Jai compiler is compared to a modern C++ compiler. Or even a C compiler vs a C++ compiler. It's night and day because of how much cruft slowly gets added on. So I find your claim that most of the Unix utilities are only written in C because that was mainstream in the day highly dubious. If anything, they would be written in something like Rust today, but definitely not JS or Python. Edit: I would also like to point out how much of a pain it would be to write low level network code, like what's necessary in curl, in a language like Python. When you're writing low level net code you want as little interference between the bytes and the programming language. Because if your bytes have some hidden padding, or the endianess is swapped, or a data structure is aligned a byte off, it means the difference between between correct transfer over the net, and sending garbage over the net. Python is not conducive at all to understanding how an object will be transformed into q series of bytes, whereas C is almost a direct translation from a struct to a series of bytes. [0]: https://gist.github.com/ambrosiogabe/66a6e2fdc77e6a600e570f4639222120 https://gist.github.com/ambrosiogabe/66a6e2fdc77e6a600e570f4...
- majewsky 4y ago> semantics over the meaning of simple Thankfully there are two different words with very separate meanings that people nonetheless tend to conflate [1]. "Simple" means "not many features", and "easy" means "good to get things done with". [1] Maybe because we have lots of people speaking English as a second language? In my mother tongue, German, there is no distinction in vocabulary between "simple" and "easy". Both translate as "einfach".
- weatherlite 4y ago"einfach" sounds a bit naughty...
- michaelcampbell 4y agoIt's been hinted at in this subthread a few times, but Rich Hickey's keynote https://www.infoq.com/presentations/Simple-Made-Easy/ https://www.infoq.com/presentations/Simple-Made-Easy/ about simple and easy is worth a listen/watch.
- ParetoOptimal 4y ago> "Simple" means "not many features", and "easy" means "good to get things done with". I'm not sure about this. What utility is a language with only simple constructs that is hard to use. Not quite a counterpoint, but a thought in that direction is: There can be features that make it easy to implement something which some find hard to understand. I suppose I question the value of simplicity for it's own sake in a language and would rather defer to how simple and understandable the resulting code is. I frequently consider the added complexity cost of a more complex compiler inherent complexity because I find the simplicity of use dwarfs compiler simplicity or simplicity "just cuz".
- shadowofneptune 4y agoNot much of a difference even among native speakers. If you pose a problem to someone, and they think they have the answer immediately, they're about as likely to say 'that's easy!' as they are to say 'simple!'
- dropofwill 4y ago
- Akronymus 4y agoFor me, simple is in the amount of concepts. For example, I consider most multi paradigm languages complex because in them functions, variables, objects, control flow, etc. are fundamentally different concepts. But something like LISP, smalltalk or Haskell are simple in my eyes, due to almost everything being the same concept on a fundamental level and the other stuff being built on top of that concept.
- pornel 4y agoThe problem is when simple vs complex is used as a value judgement, implying that simpler is better. It's not that simple. Conway's game of life has an incredibly simple definition, and is Turing Complete. The Brainfuck language has a minimal number of language concepts and barely any syntax. And yet, programming in these languages is very hard. Humans need a certain level of language complexity to be able to express themselves. When you simplify things it's not always clear if you're removing superfluous complexity, or removing tools needed to deal with inherent complexity of the problems you need to tackle. I don't think there's even any single objectively appropriate level of complexity, because it depends on the complexity of the problem the language tackles. By analogy to human languages: scientific language has its own jargon (sometimes overused!), but it needs an extended vocabulary to precisely describe the things and problems it works with. Without the added complexity it'd be unproductive due to being verbose and sometimes ambiguous, like the amusing example of Up Goer Five: https://xkcd.com/1133 https://xkcd.com/1133
- Akronymus 4y agoAs I am not good with words, I am just gonna take this: https://news.ycombinator.com/item?id=31492953 https://news.ycombinator.com/item?id=31492953 Specifically what I wanted to express, is that, for me, the turtles all the way down is what I understand as simplicity. And yeah, simplicity alone can't be used as a value judgement.