Re:Kotlin: A New Hope in a Java 6 Wasteland
by AnimalMuppet on Monday September 28, 2015 @07:32PM
(#10293860)
No, assembly is more than turing complete. On many CPUs, you get instructions like "enter supervisor mode" or "flush the data caches" or "change the interrupt mask", which aren't part of the definition of a turing machine. (I know, floating-point multiplication isn't, either, but you're going to have to be able to do at least some kinds of arithmetic to implement a turing machine, whereas supervisor mode is completely outside the spec.)
And C, Java, Perl, etc, also don't have anything like "enter supervisor mode". But if the CPU supports it, assembly will let you do it.
Re:Kotlin: A New Hope in a Java 6 Wasteland
by kbenson on Monday September 28, 2015 @08:09PM
(#10294009)
Again, that depends entirely on how you define "feature". If the feature in question is "easy use of hashes as a built in data type" assembly doesn't have it. Yes, you can implement hashes in assembly, the the feature as outlined is not something you can ascribe to assembly. Additionally, assembly has a few features that are not replicated in most languages (but not all, some languages allow inlining assembly). So they are often just partially overlapping sets.
That is, both C and Perl can implement Hash data objects, but C requires a library or implementation, and Perl makes it a core data type of the language.