Lazarus

Miscellaneous => Other => Topic started by: ccrause on July 21, 2022, 12:58:51 pm

Title: Carbon, a new programming language from Google...
Post by: ccrause on July 21, 2022, 12:58:51 pm
This is just an idle observation that Google has birthed another language: Carbon (https://9to5google.com/2022/07/19/carbon-programming-language-google-cpp/).  The project (https://github.com/carbon-language/carbon-lang) already has close to 7500 stars.  It is interesting how the hype of a new language attracts people...
Title: Re: Carbon, a new programming language from Google...
Post by: MarkMLl on July 21, 2022, 01:05:57 pm
It is interesting how the hype of a new language attracts people...

It merely indicates the extent to which the majority of people obliged to use C++ are thoroughly fed up with it.

To loosely paraphrase Ken Thompson- "at Google, out builds of C++ software were taking 45 minutes. Then we were invited to sit through yet another presentation of what they proposed to add to the language".

MarkMLl
Title: Re: Carbon, a new programming language from Google...
Post by: Handoko on July 21, 2022, 01:16:13 pm
People like new things but eventually they will become less shiny. Pascal isn't as popular as its golden days but still keep improving and has good user base.
Title: Re: Carbon, a new programming language from Google...
Post by: 440bx on July 21, 2022, 01:24:19 pm
Obviously, I don't know the language but, looking at the screenshots, I think Google continued in the perpetuation of language design mistakes.

One thing language designers should have learned from N. Wirth but, obviously didn't, is that a language should provide maximum power using the simplest possible syntax while remaining intuitive, an Oberon trait.

Another grain of sand in the beach... hopefully not quicksand in the long run.





Title: Re: Carbon, a new programming language from Google...
Post by: Martin_fr on July 21, 2022, 01:32:31 pm
https://xkcd.com/927/
Title: Re: Carbon, a new programming language from Google...
Post by: marcov on July 21, 2022, 01:44:49 pm
Funny that there doesn't seem to be much aim except to replace C++ and be inclusive.

But hey, we can finally put go to rest :-)
Title: Re: Carbon, a new programming language from Google...
Post by: MarkMLl on July 21, 2022, 02:07:38 pm
You mean in the way that Go saw off Kotlin? Or was it the other way round?

MarkMLl
Title: Re: Carbon, a new programming language from Google...
Post by: marcov on July 21, 2022, 02:32:44 pm
You mean in the way that Go saw off Kotlin? Or was it the other way round?

Kotlin aimed more at javascript as target than C++ ? Or am my confusing my hype languages ?
Title: Re: Carbon, a new programming language from Google...
Post by: MarkMLl on July 21, 2022, 05:26:34 pm
Kotlin aimed more at javascript as target than C++ ? Or am my confusing my hype languages ?

General purpose language, to replace in particular Java.

MarkMLl
Title: Re: Carbon, a new programming language from Google...
Post by: Leledumbo on August 11, 2022, 05:16:16 am
One thing language designers should have learned from N. Wirth but, obviously didn't, is that a language should provide maximum power using the simplest possible syntax while remaining intuitive, an Oberon trait.
Depends on the purpose of making the language. Carbon really aims to replace C++ by targeting not only compatibility, but also interoperability, much like Objective-C approach to C. Thus, every valid C++ code is a valid Carbon code. This has been somewhat proven in the past to boost psychological confidence that helps adoption. I don't know what Google has in mind, but probably this approach can be used as a lure first, eventually they will add "better" replacements for constructs they consider bad, which naturally leads to termination of C++ IF those replacements succeed, i.e. they're used and preferred. At that point, they can drop C++ compatibility/interoperability and Carbon becomes standalone language.
Title: Re: Carbon, a new programming language from Google...
Post by: 440bx on August 11, 2022, 06:04:50 am
Depends on the purpose of making the language. Carbon really aims to replace C++ by targeting not only compatibility, but also interoperability, much like Objective-C approach to C. Thus, every valid C++ code is a valid Carbon code. This has been somewhat proven in the past to boost psychological confidence that helps adoption. I don't know what Google has in mind, but probably this approach can be used as a lure first, eventually they will add "better" replacements for constructs they consider bad, which naturally leads to termination of C++ IF those replacements succeed, i.e. they're used and preferred. At that point, they can drop C++ compatibility/interoperability and Carbon becomes standalone language.
What you stated sounds quite reasonable and, I have to admit that I believe their motivation is as you stated it.

Myself, I see the situation in computer language design as being quite similar to the situation with car manufacturing back in the 70's.  Back then, the U.S industry was producing low quality cars (pretty close to junk) and selling them for as much as they could get (as economists say, "charge what the market will bear"), in the meantime, the Japanese were were focused on making an ever better car.  At the end of the day, the better car won the day and the U.S industry is still trying to figure out how to build a car as good and reliable as a Japanese car.

I view compatibility with C and C++ as an attempt to copy a rather _deficient_ design.  (that said, I do think that the C language has a reasonably good feature set, just very poorly implemented.)  There are a lot improvements that could be part of a new design but, compiler writers seem to be stuck putting more lipstick on a pig.  The only reason that may end up working is because the result may end up being "the least bad alternative" instead of something genuinely good.

Another thing I find interesting, is that, there are _countless_ books on how to write a compiler but, very _few_ (personally, I haven't even seen one) books about how to design a programming language. 




Title: Re: Carbon, a new programming language from Google...
Post by: skalogryz on August 11, 2022, 06:12:58 am
Can we finally remove Carbon widgetset from LCL then?
Title: Re: Carbon, a new programming language from Google...
Post by: MarkMLl on August 11, 2022, 09:17:06 am
Another thing I find interesting, is that, there are _countless_ books on how to write a compiler but, very _few_ (personally, I haven't even seen one) books about how to design a programming language.

That's a good point, although there is a significant corpus of conference presentations and oral histories.

I suppose that one thing that's lacking is a distillation of conference informal discussions etc., i.e. "you could have done it better like this" vs "yes but...".

On thing of which there is no shortage is papers on how to design an efficient parser to cope with outrageous syntax. However I'd argue that just as human language which is difficult to parse has no place in diplomacy, syntax which is difficult to parse has no place in a computer language.

MarkMLl
Title: Re: Carbon, a new programming language from Google...
Post by: 440bx on August 11, 2022, 09:28:27 am
On thing of which there is no shortage is papers on how to design an efficient parser to cope with outrageous syntax. However I'd argue that just as human language which is difficult to parse has no place in diplomacy, syntax which is difficult to parse has no place in a computer language.

MarkMLl
I couldn't agree anymore. A bit sad of a situation.
TinyPortal © 2005-2018