4 ms·
Weird that a systems language and a web language are different, huh?
by clownz0r 15y ago
Weird that a systems language and a web language are different, huh?
- cromwellian 15y agoOne has pointers and no security model and produces binary processor-dependent artifacts, the other has to support untrusted code, mobile code that runs on any device.
- sipefree 15y agoGo doesn't really have pointers in the same manner as C, though, does it? As was as I was aware, you can only have a pointer to an actual object.
- enneff 15y agoGo allows you to take the address of any value. You just can't do pointer arithmetic like you can in C. That is, you can't address uninitialized memory.
- ootachi 15y agoI assume you mean "any lvalue"? You can't take the address of rvalues, can you?
- deleted 15y ago[deleted]
- SteveMcQwark 15y agoEssentially, you are correct. Lvalues can have their address taken while rvalues cannot. However, the Go spec doesn't speak in terms of lvalue vs rvalue, it speaks in terms of the addressability of different kinds of expressions.
- enneff 15y agoGo doesn't define "lvalues," in the spec, but it does define "addressability." My comment would be more accurate if I had said "Go lets you take the address of any value in memory." (stack or heap)
- masklinn 15y agoI said "coherent" not "identical". They could be coherent on shared features, such as type specifications or variable declarations, which have little to do with the "class" of the language. They're not.
- thirsteh 15y agoOne of the design goals: "Ensure that Dart delivers high performance on all modern web browsers and environments ranging from small handheld devices to server-side execution." Server-side execution...
- rdtsc 15y agoI don't see any reason why the syntax of a systems language couldn't be the same as the syntax of a web language. They can have different libraries available to them for example but syntax doesn't have to be different.
- sambeau 15y agoIf they had taken Javascript (or if you prefer a more coffee-script like syntax) and added Go's best features: interfaces-as-duck-typing, channels as fundamental types, string iteration over runes rather than bytes then they would have had a nice little language. The only thing I like is underscore for private variables. Go does the opposite (which I think is a safer approach): anything you want public has to start with a capital. It really works—it is both easy to do and easy to read.
- pacala 15y agoSystems language: move data from point A to point B. Web language: move data from point A to point B.
- dextorious 15y agoAirplane: move people from point A to point B. Boat: move people from point A to point B.
- pacala 15y agoVoiture: transport des personnes du point A au point B Car : move people from point A to point B
- dextorious 15y agoYeah, you didn't really get the point. Again. Systems language and web language are not just a different name for the same thing --like Voiture and Car. And, no, that their function defined in abstract and in totally generic terms is the same, doesn't make them the same thing. "move data from point A to point B" can be said for any programming language. As such, it's not particularly enlightening when comparing a language's suitability to a specific task. Turing-completeness aside, your argument misses the point that a particular language's design, compiler, library, toolset, (heck, even a particular language's community) can make it better suited for system programming or for web programming or for some other field.
- pacala 15y agoAvion: transport des personnes du point A au point B Boot: Menschen bewegen von Punkt A nach Punkt B We are talking past each other :) Here is your first comment interpreted through your second one. There is no reason to have different languages, but it's OK to have different jargon.
- dextorious 15y ago