Recent

Author Topic: Carbon, a new programming language from Google...  (Read 1616 times)

ccrause

  • Hero Member
  • *****
  • Posts: 856
Carbon, a new programming language from Google...
« on: July 21, 2022, 12:58:51 pm »
This is just an idle observation that Google has birthed another language: Carbon.  The project already has close to 7500 stars.  It is interesting how the hype of a new language attracts people...

MarkMLl

  • Hero Member
  • *****
  • Posts: 6683
Re: Carbon, a new programming language from Google...
« Reply #1 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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: Carbon, a new programming language from Google...
« Reply #2 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.

440bx

  • Hero Member
  • *****
  • Posts: 4015
Re: Carbon, a new programming language from Google...
« Reply #3 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.





(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: Carbon, a new programming language from Google...
« Reply #5 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 :-)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6683
Re: Carbon, a new programming language from Google...
« Reply #6 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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: Carbon, a new programming language from Google...
« Reply #7 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 ?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6683
Re: Carbon, a new programming language from Google...
« Reply #8 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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Carbon, a new programming language from Google...
« Reply #9 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.

440bx

  • Hero Member
  • *****
  • Posts: 4015
Re: Carbon, a new programming language from Google...
« Reply #10 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. 




(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Carbon, a new programming language from Google...
« Reply #11 on: August 11, 2022, 06:12:58 am »
Can we finally remove Carbon widgetset from LCL then?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6683
Re: Carbon, a new programming language from Google...
« Reply #12 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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

440bx

  • Hero Member
  • *****
  • Posts: 4015
Re: Carbon, a new programming language from Google...
« Reply #13 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.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018