DEV Community


Discussion on: Julia, surprise me! (some astonishments while learning a new programming language)

jmccabe profile image
John McCabe • Edited

Essential to a new language, for me, means lots of things but, in particular, getting away from idiotic syntax. A prime example is confusion with = and ==. The latter is stupid; = should be the equality operator and something else, e.g. := (like in some of the most well-designed and thought out languages of the last 40+ years, Pascal, Modula-2, Ada etc) used for assignment.

Another is Java's short-circuit logical operators; for a language that has such close ties to C++ (and C), the choice of & and && was phenomenally stupid. This is another place where Ada is superior, using 'and', and 'and then' (alternatively 'or' and 'or else') to differentiate between normal and short-circuit versions.

In addition, the language really needs to be able to do things that are impossible in existing languages.

Most of the 'new' languages I've seen over the last 30 years, especially the last 10 years, are just because some developer's ego has got the better of them. These are talented people, very talented in most cases, but their efforts would be better spent getting more involved in enhancing features of existing languages, rather continuing to fragment the market with more and more niche languages that won't last after the original author has got bored with it.

epogrebnyak profile image
Evgeny Pogrebnyak Author

One developper's ego brought Python to us, for example. I would not be so sceptical of new languages. ) And Julia is cool. ))

jmccabe profile image
John McCabe

Don't get me started on Python; had the geezer whose ego resulted in Python actually paid proper attention to 'real' programming languages, he wouldn't have decided to use exclusively zero-based indexes in sequences/lists (that's just lazy), nor specification of ranges from 'start index' to 'end index + 1', e.g. a slice a_list[12:15] isn't a 4 element subset of a_list made up of the items in index 12 through 15, it's a 3 element subset including items 12 through (15 - 1). This is related to the zero-based indexing; a_list[:12] gives you 12 elements starting at 0.
The point of a high level language is to allow us to abstract the implementation away from the machine domain into the problem domain; exclusive zero-based indexing at the source code level is nonsense.

I haven't looked closely at Julia; how closely based on C is it? What features does it have that 1) aren't in any other language and 2) couldn't possibly have been added to another language?