Live data from Hacker News

If I were to invent a programming language for the 21st century

wordsandbuttons.online

151–160 of 184 posts

Re: If I were to invent a programming language for the 21st century

#151
I think programing in the future needs to:

- treat a program as a database

- allow programs to be visualised in many formats (visually as graphs, textually as code etc)

- allow programs to be manipulated through many interfaces (visually, textually, programatically)

It’s not that text and syntax should die, it’s that different visualization and manipulation paradigms are appropriate for different levels of abstractions within programs.

2c

Re: If I were to invent a programming language for the 21st century

#152
post #117

Earlier quoted context omitted.

CTEs can go a long way toward that, as can stored procs

LATERAL joins can help with reusing calculations https://www.periscopedata.com/blog/reuse-calculations-in-the...

Wow that's a bad example. Any decent query engine (which I'm assuming Postgres has) would reuse common subexpressions.

Re: If I were to invent a programming language for the 21st century

#153
post #44

> The INCITS 226–1994 standard consists of 1153 pages. This was only beaten by C++ ISO/IEC 14882:2011 standard with 1338 pages some 17 years after. C++ has to drag a bag of heritage though, it was not always that big. Common Lisp was created huge from the scratch. This is a surprisingly incorrect remark, given that the author is apparently fairly well aware of programming language history. Common Lisp is a relatively…

It's also surprisingly incorrect about C++ given that he goes on to say "A programming language should not be that huge. Not at all. It’s just that it should have a decent standard library filled with all the goodies so people wouldn't have to reinvent them."

The 1338 pages of the C++11 standard is more than 2/3rds about the standard library. Only around the first 400 are about the core language.

Re: If I were to invent a programming language for the 21st century

#154

Earlier quoted context omitted.

Indeed. The original description of Lisp included something like 10 primitives. That's it. Numerous examples of full-blown Lisps have been built from just those few primitives. One article I read even showed how arithmetic can be built from car and cdr.

Source? I’d love to read more about this

http://languagelog.ldc.upenn.edu/myl/llog/jmc.pdf The Roots of Lisp by Paul Graham.

Re: If I were to invent a programming language for the 21st century

#155
> However, the distinct feature of the 21st-century language design is the absence of any distinct features in the languages themselves.

I would qualify Pony as only fast, concurrency-safe, new language noteworthy, also it's capabilities system and complete lack of blocking IO, needed to provide concurrency safety. Also its GC, which is completely new.

Re: If I were to invent a programming language for the 21st century

#156
> Swift, Kotlin, and Go are probably among the most popular. [...] They don’t have anything new in them at all; they are all made by the “something done right” formula, this something being Objective-C, Java or C

Go isn't just C done right, but both C and C++ done right. Similarly, Kotlin is both Java and Apache Groovy done right.

Re: If I were to invent a programming language for the 21st century

#157

There are some good points in this article, namely that a very lengthy language specification is a sure sign that the language is overblown and probably the victim of design by committee. Modula-2 had a 100 page description, and i would take it over C++ any day. Heck C++ still doesn't have separate compilation. It is a total pile of crap IMHO. Another good point is that languages that facilitate domain specific langu…

And Oberon (also by Niklaus Wirth) has a 20 page description.

Re: If I were to invent a programming language for the 21st century

#158
post #132
post #70

Earlier quoted context omitted.

Very much agree. Programming notation, like math, is supposed to be easy to convey exact meaning, unlike human language. Every attempt there has been to make code look like English hasn't worked out well. SQL, for example, is incredibly verbose, with complex syntax. This obscures what is otherwise very good semantics. I think this is why a lot of people hate writing queries.

I rather think Math is a good counter example. Or physics rather. There aren’t enough greek letters in the alphabet to satisfy the average academic paper. You first have to load in your memory the meaning of 20 different symbols then decypher a formula before you can process it. Now people who read lots of papers are probably used to this exercise but that doesn’t mean it’s a good thing (you can get used to running o…

Those who are not used to the terminology of physics or math would not be able to follow a paper no matter whether it was stuffed with the Greek alphabet or nice descriptive names. They'd be baffled by the formulae and concepts and lack the understanding needed to see the trees through the forest even if it were written like prose, maybe even more so as a formula at least gives some idea of what goes in and what comes out, what belongs together and in what order things are to be seen by virtue of some easily understandable symbols. While it is a fact that some people - often those who lack self-confidence - revel in being obtuse to increase the appearance of them being the guardians of some semi-magical 'Knowledge' this is not the reason why STEM-fields tend to gravitate to their own 'secret languages'. This starts in school where children learn that 1 + 1 = 2 instead of take the abstract number one, add another abstract number one and you now have the abstract number two.

Re: If I were to invent a programming language for the 21st century

#159
post #132
post #70

Earlier quoted context omitted.

Very much agree. Programming notation, like math, is supposed to be easy to convey exact meaning, unlike human language. Every attempt there has been to make code look like English hasn't worked out well. SQL, for example, is incredibly verbose, with complex syntax. This obscures what is otherwise very good semantics. I think this is why a lot of people hate writing queries.

I rather think Math is a good counter example. Or physics rather. There aren’t enough greek letters in the alphabet to satisfy the average academic paper. You first have to load in your memory the meaning of 20 different symbols then decypher a formula before you can process it. Now people who read lots of papers are probably used to this exercise but that doesn’t mean it’s a good thing (you can get used to running o…

All those symbols are necessary for readable math though. For millenia people did math as you describe, and it worked very poorly compared to modern math notation.

For example, how would you write something like a tensor H_i^{kl} (pretend those are rendered sub and superscripts)?

Looking at that symbol, I immediately understand that H is a tensor with one lower index and two upper. Now, it precise words, it would probably be something like:

"Let H be a tensor with lower index i and upper indices kl."

Oh wait, we've already had to define all the variables anyway (since we don't want to specialize it to an individual tensor, because that would be useless). Why not just use a bit more notation and write it as H_i^{kl}?

If we ran out of letters, we'd have to use Greek ones. Now we are back to where we started.

Re: If I were to invent a programming language for the 21st century

#160
post #70

Earlier quoted context omitted.

Very much agree. Programming notation, like math, is supposed to be easy to convey exact meaning, unlike human language. Every attempt there has been to make code look like English hasn't worked out well. SQL, for example, is incredibly verbose, with complex syntax. This obscures what is otherwise very good semantics. I think this is why a lot of people hate writing queries.

> SQL, for example, is incredibly verbose, with complex syntax. This obscures what is otherwise very good semantics. I disagree; I think SQL syntax is one of the things that make it very clear and easy to use; it's got a couple of warts, especially related to automated tooling (the biggest being fixed order of clauses with SELECT before FROM), but it's exceptionally well fit for it's purpose. > I think this is why a…

>I've known more people comfortable with SQL and thrown by typical programming languages than the reverse.

Non-programmers often find SQL queries easier, and simple SQL queries are intuitive. Programmers, who are likely to do more complicated ones, usually don't like it. At least in my experience.

The issue is that it is hard to quickly visually parse complicated queries, like big CTEs. Having it in a less English-like notation would go a long way to fix this.

Post reply on HN