Live data from Hacker News

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

wordsandbuttons.online

101–110 of 184 posts

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

#101
post #42

Earlier quoted context omitted.

The OP wants a modernized COBOL.

In fact, that's what they say after clicking the buttons at the bottom - which are actually part of the article.

Actually not if one reads carefully.

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

#102
post #58
post #41

Earlier quoted context omitted.

I wholeheartedly agree with you on this. `create file /tmp/test.txt for input and output as test_file` To me, this does not explain what's happening here with any clarity. I'm left feeling overwhelmed with uncertainty and ambiguity. Is there an iterable being acted on? Is this blocking? Is it creating a variable? Two variables? What type is /tmp/test.txt when it has no quotation marks, and how does it handle spaces o…

> Is there an iterable being acted on? Is this blocking? Is it creating a variable? Two variables? What type is /tmp/test.txt when it has no quotation marks, and how does it handle spaces or concatenation/methods? Well, if you knew the language, you'd have answer to all of those questions. Plus, if you didn't know C, you'd be baffled by the other example as well...

For any reasonably complex example its not at all clear that this is so. Being more english like is actually a hardship not a benefit because naturally language is famously ambiguous and difficult to decode.

Either your language is incredibly complex or it understands a very stilted subset of actual normal language that only happens to look like natural language and you have to remember to use that stilted subset in which case what is the benefit of this vs foo = bar.

Regarding complex language we seem remarkably bad at simple things.

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

#103
> The most exciting thing, we already have the language exactly like this! What do you think it is?

He then proceeds to list 8 OOP mutable languages and one functional immutable language (Haskell). FFS.

I hate to relay the news to the OOP zealots but (having spent decades in OOP/procedural and about 3 years in Elixir) the future of reliable software is in functional languages with immutable data and, ideally, process supervision and massive concurrency (due to the breakdown of Moore's Law). The only language that does all this handily is the BEAM VM (via Erlang and Elixir) and possibly Haskell.

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

#104
post #67

Earlier quoted context omitted.

How much experience do you have from C, Forth & Lisp? Spend enough time in these languages and you start seeing the world differently. Less syntax (when designed well) doesn't have to be unreadable.

How much experience do you have with 10000 lines+ codebases written in Forth or Lisp? There is a reason people choose boring imperative languages for large projects. I did an internship at an 'Big 4' company which (from folklore) had a moderately large server written in Haskell, the codebase was a nightmare and eventually they ended up rewriting it in C++, which I believe they still use.

10kloc is not a large code base for Lisp. There are much larger codebases for Lisp - some which have been maintained for decades.

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

#105
> And it’s huge. 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.

Common Lisp the Language was published in 1984 and it had 460+ pages. Heritage? The language itself was mostly based on a larger earlier language: Lisp Machine Lisp. That one had a language documentation, but not a standard. The standard for Common Lisp was published in 1994, after eight years of work from 1986 on. It was based on the 1984 Common Lisp, which was based on NIL, S-1 Lisp, Lisp Machine Lisp and Spice Lisp - all projects which developed a successor of Maclisp.

> 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.

Common Lisp in part is a larger Lisp dialect (but with a relatively small number of built-in constructs: http://www.lispworks.com/documentation/HyperSpec/Body/03_aba... ) and the standard includes a standard library - without actually dividing the language into a core and a library.

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

#106
post #96
post #94

If I were to invent a programming language for the 21st century, the main feature that would make people frown is that it would not be laid down in a flat text file. - It would allow high-level programming like constraints statements a la Prolog. - It would allow graphical block building a la PureData - It would generate lower level version of these and allow a user to "zoom" into the generated code down to the machi…

> If I were to invent a programming language for the 21st century, the main feature that would make people frown is that it would not be laid down in a flat text file. Yes! It drives me crazy that due to a historical accident, we're still essentially writing programs as decks of 80-column punch cards. Nowadays the decks are virtual and the editing tools are better, but languages really haven't evolved to take advanta…

Isn't it more useful if such marks like showing something in bold or a different color are automatically applied to classes of marks like identifiers or strings?

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

#107
post #13

>The language for the 21st century should be business oriented, English-like and not dependent on native types. Not sure this is a popular opinion as presented by the author? I'd say the most sought-after PL features would be expressive type systems and those that reduce boilerplate. I've never heard someone long for a more "business oriented" programming language. >It’s naïve to think that the language is responsibl…

>I've never heard someone long for a more "business oriented" programming language. I don't think that was a genuine opinion of the author, more just a cheeky hint at the reveal that they were describing COBOL (COmmon Business Oriented Language) the whole time.

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

#108
I upgraded Firefox on a Pine64 laptop that brought in all the schmancy concurrent CSS handling that I'm assuming Rust made possible.

It was like upgrading the computer from a barely workable state to a pleasant browsing experience for $0.

Could COBOL have been used instead to provide that same "set of rails" atop which Mozilla drove that concurrency development?

To be clear-- I'm not asking if COBOL is turing complete. Mozilla could have coded all that in C++ if they wanted to. I'm asking if COBOL would have so clearly helped the devs reason about concurrency that it would have been worth the effort of adding a new language instead of writing it in C++.

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

#109
post #76

Earlier quoted context omitted.

Sure, they are awesome languages. We are talking about readability though, which unfortunately means your code has to be readable by "fresh out of school code monkeys" and not just experienced coders.

So the Haskell to C++ rewrite in your earlier example is supposed to be beneficial, because fresh-out-of-school code monkeys will understand it? How so if all they speak is JS and Python.

Someone only speaking JS or Python will have a significantly easier time with a C++ codebase than a huge Haskell codebase.

You can have someone totally new to the project fixing bugs in a few days.

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

#110
post #104
post #67

Earlier quoted context omitted.

How much experience do you have with 10000 lines+ codebases written in Forth or Lisp? There is a reason people choose boring imperative languages for large projects. I did an internship at an 'Big 4' company which (from folklore) had a moderately large server written in Haskell, the codebase was a nightmare and eventually they ended up rewriting it in C++, which I believe they still use.

10kloc is not a large code base for Lisp. There are much larger codebases for Lisp - some which have been maintained for decades.

Sure, but how many? I'd bet that that C, C++, Java or even Python has a numbers advantage by one or two orders of magnitude.

Also, how many of these codebases attract new contributors regularly? That's a pretty direct metric for readability of a codebase.

Post reply on HN