12 ms·
> And apparently the astronaut !touchscreen! GUI is written in Javascript (not a joke). why would that be mistaken for a joke?
by DrammBA 2y ago
> And apparently the astronaut !touchscreen! GUI is written in Javascript (not a joke).
why would that be mistaken for a joke?
- vasco 2y agoBecause they don't want people confusing the launch pad with left-pad and having the spaceship slowing down because of Facebook Like button embeds.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- weard_beard 2y agoAttempt to give a serious answer: Javascript, as a language, has some bizarre return types that can make the kind of thorough testing required in spaceflight difficult. (See: https://github.com/denysdovhan/wtfjs https://github.com/denysdovhan/wtfjs) It also has a reputation, like PHP, as being utilized by inexperienced programmers who write poorly structured, poorly test, bloated, and slow code that often crashes and fails. If you want fast, light weight, reliable, well structured, testable, and ultimately very stable code Javascript would seem to be a poor choice within the parameters required for a space vehicle. (Maybe this is a good place to ask, anyone have a recommendation for static testing of JS?)
- electrosphere 2y agoI believe it's because in JavaScript some values or expressions are "truthy" or "falsey" depending on how they are evaluated.
- fennecfoxy 2y agoMany languages work like that and a lot of the issues people point out with JS are applicable to many scripting languages. Usually people point out Maths problems...aka problems with floats, which isn't really a JS problem. People also point out stuff like `[]+[]` where Array addition operator is not overloaded to handle it at all because the correct way is to use `.concat` so I think by default duck typing comes into play and in most cases with that in JS the preferred type is string. I do wish that there was a "cleaner" spec of JS that wasn't as backwards compatible but fixed all of the gotchas and filled in every gap but there doesn't seem to be much call for it atm.
- bboygravity 2y ago1. Because nobody in aerospace globally and in the history of humanity never did this before as far as I know. 2. Because many people not familiar with the exact application/industry (guilty) would assume that safety critical machines need to pass safety critical software tests/standards/languages. Javascript is definitely not known to fall in that category. 3. My main reason for thinking it was a joke when I first read it: I personally hate touchscreens (I actually use a phone with a physical keyboard on it). I would hate a touchscreen in a car, let alone a spacecraft. Let alone when I'm wearing a space-suit with massive gloves where touching the wrong button could maybe be life/death in the worse case or SUPER annoying in the best case.