News for hackers. Stuff that matters.
Re:Fuchsia Programming Language Policy by mythz on Monday February 24, 2020 @10:18PM (#22410646)
Very interesting to see a technology focused analysis of what Google thinks about the strengths and weaknesses of the different languages are.

Usually analysis's embed personal biases or are either marketing sponsored posts to spur adoption but this looks to genuinely look at the technical merits of each language in the context for using it to develop Fuchsia OS.

From this analysis C++ and Dart are given the green light, Dart for high-level code as "Asynchronous programs can be written using straight-line code and People using the language are highly productive." but because of its GC and substantial runtime environment it's "more resource intensive" and not ideal for programs that run indefinitely.

The comparisons between Google's designed and controlled "Go" vs Mozilla's sponsored "Rust" is very interesting, since Go is widely used within Google and its implementation could be influenced by Fuchsia it was initially used but because of their negative experiences it's been blacklisted with all code except netstack needing to be migrated to an approved language.

The biggest con of Rust seems to be that it's still new, not widely used and its unique properties haven't been time tested enough yet, but as it's still approved as it's more performant and requires less resources than Go.

Re:Fuchsia Programming Language Policy by pjmlp on Tuesday February 25, 2020 @01:25AM (#22411303)
NVidia has decided to embrace Ada/SPARK after a study with Ada, Frama-C and Rust, and there is a Webinar with their decision rational.

They also had similar reasons, however lack of ISO standard and certified compilers also played a role.

Re:Fuchsia Programming Language Policy by cpeterso on Tuesday February 25, 2020 @02:19AM (#22411446)
Link to NVIDIA's "Securing the Future of Safety and Security of Embedded Software" webinar about Ada/Spark:

https://www.adacore.com/webinars/securing-future-of-embedded...

Re:Fuchsia Programming Language Policy by phkahler on Tuesday February 25, 2020 @07:07AM (#22412483)
They mentioned one of the pros of C that nobody seems to talk about. The stable ABI that allows language interoperability via FFI. Until another language gets this right, C is going to be ever present at the bottom of every stack.
Re:Fuchsia Programming Language Policy by kryptiskt on Tuesday February 25, 2020 @08:26AM (#22412976)
The C ABI doesn't require the presence of C in the stack, it can just be there in spirit like the ghost of Pascal in the Windows ABI.
Re:Fuchsia Programming Language Policy by jacobush on Tuesday February 25, 2020 @08:51AM (#22413152)
Yes, but in practice it's often easier to just fire up the C compiler and do some shim files and linking in the bottom.
Re:Fuchsia Programming Language Policy by bluejekyll on Tuesday February 25, 2020 @09:16AM (#22413349)
Easier than what? Their are a lot of languages that make exporting/importing C ABI dead simple. Rust, C++ and C# are some I’m familiar with, I’ve also been pleasantly surprised at Node.js (for imports) in this regard.
Re:Fuchsia Programming Language Policy by thu2111 on Tuesday February 25, 2020 @02:41PM (#22416574)
At least, the JVM and .NET have provided stable cross-language ABIs that are much more sophisticated than C for a long time now. You can even build operating systems with them. The Fuschia guys chose not to, but it's not like it's technically impossible or anything like that.
Re:Fuchsia Programming Language Policy by GoblinSlayer on Friday February 28, 2020 @04:45AM (#22441659)
>Until another language gets this right

Yes? In the next point they mention that pretty much all languages support the C ABI.

Re:Fuchsia Programming Language Policy by GoblinSlayer on Friday February 28, 2020 @04:57AM (#22441701)
The document is written by a manager and some merits are for the purpose of Google's corporate politics, which aren't really technical merits a programmer expects. The context and selection criteria are not specified either, although they are fairly obvious, e.g. go didn't fly because it's entrenched in its niche - network services in data centers - and no amount of control can make that niche intersect with Fuchsia niche.
Re:Fuchsia Programming Language Policy by tonyedgecombe on Tuesday February 25, 2020 @03:49AM (#22411735)
but because of their negative experiences it's been blacklisted with all code except netstack needing to be migrated to an approved language.

Have you got a reference for that, it seems pretty damning if it's true.

Re:Fuchsia Programming Language Policy by mythz on Tuesday February 25, 2020 @03:55AM (#22411754)
Did you read the section for Go?

> Con: The Fuchsia Platform Source Tree has had negative implementation experience using Go.

Decision

> Go is not approved, with the following exceptions: netstack ... In the fullness of time, we should migrate

> All other uses of Go in Fuchsia for production software on the target device must be migrated to an approved language.

Re:Fuchsia Programming Language Policy by tonyedgecombe on Tuesday February 25, 2020 @05:07AM (#22412052)
Sorry, I mis-interpreted your statement to mean the whole of Google.
Re:Fuchsia Programming Language Policy by rob74 on Tuesday February 25, 2020 @04:03AM (#22411785)
Full quote:

> Con: The Fuchsia Platform Source Tree has had negative implementation experience using Go. The system components the Fuchsia project has built in Go have used more memory and kernel resources than their counterparts (or replacements) the Fuchsia project has built using C++ or Rust.

I wonder if they had other negative experiences beside the higher resource usage? Because it's hardly surprising that a garbage-collected language should have higher resource usage than C++/Rust. They could have still supported it for app development however - but it seems they took a "there can only be one" approach and went for Dart instead.

Re:Fuchsia Programming Language Policy by pjmlp on Tuesday February 25, 2020 @05:51AM (#22412202)
Supporting Go for app development would mean having to design a generics free API.

Also most likely why Android will never support Go officially.

Re:Fuchsia Programming Language Policy by terminaljunkid on Tuesday February 25, 2020 @09:38AM (#22413528)
Generics Free, No exception handling, also hard to support to shared libraries.

That's more cost than benefit.

Re:Fuchsia Programming Language Policy by jstimpfle on Tuesday February 25, 2020 @10:10AM (#22413750)
> also hard to support to shared libraries

why?

Re:Fuchsia Programming Language Policy by thu2111 on Tuesday February 25, 2020 @02:43PM (#22416603)
Go doesn't really have a standard/stable ABI. The way you include one module inside another is by doing what amounts to a big #include on the source code.