|
|
|
|
|
by mpweiher
4064 days ago
|
|
They probably will do so with Swift in the future, but at present it is much more difficult. I did a quick summary of the talk, which had a bit more detail, here: https://news.ycombinator.com/item?id=9471204 In short, they used one of the available open-source frontends (clang, the other being gcc). In addition, Objective-C is almost completely trivial to implement if you have a C compiler. Heck, a 17 year old kid with nothing but a C compiler, access to the Brad Cox book and no formal training in CompSci in general or compilers in particular managed to pull it off back in 1986 or so. Swift is closed-source, so unless or until that changes, it is a reverse-engineering effort. It is also a vastly more complicated language to implement. It is hard to even begin to describe the difference. It leans on the compiler and optimizer by what I consider to be an insane amount, just the rules for initializers and named keyword arguments are bigger than the entire Smalltalk language spec (which is the part Objective-C adds to C). The optimizer is required if you want performance greater than Ruby interpreting a Python program. etc. On the other hand, it is in many ways similar to C#, so probably not that hard a feat for MS to pull off. |
|