Earlier quoted context omitted.
That's a Texas sized 10-4
What's so bad about Scala? I've only used it for hobby projects myself.
Why F# evangelism isn't working (2015)
331–333 of 333 posts
Re: Why F# evangelism isn't working (2015)
#332Earlier quoted context omitted.
Working for an org who bet on a mix of scala, python, and typescript, I can tell you which languages are being bet on for the rewritten services, and which language is getting in the way of getting things done.
Care to elaborate? Are there any big frameworks in the mix that might have gone from oss to commercial?
Re: Why F# evangelism isn't working (2015)
#333Earlier quoted context omitted.
You would need another feature in addition: the ability to change the runtime type tag of a value. Then monkey-patching would be changing the type of a value to a subclass that has overridden methods as you request. The subclasses could be named, but it wouldn't have much value. As you could repeatedly override methods on the same value, the names wouldn't be of much use, so you might as well make the subclass anonym…
So how would you compile code which contains a call to a method which is only defined at runtime?
Given that, a sketch of a statically-typed system would be something like... At the time a definition is added to the environment, you type check against known definitions. Future code can change implementations, as long as types remain compatible. (Probably invariantly, unless you want to include covariant/invariant annotations in your type system...)
This doesn't change that much about a correct program in a dynamic language, except that it may provide some additional ordering requirements in code execution - all the various method definitions must be loaded before code using them is loaded. That's a bit more strict than the current requirement they the methods must be loaded before code using them is run. But the difference would be pretty tractable to code around.
And in exchange, you'd get immediate feedback on typos. Or even more complex cases, like failing to generate some method you had expected to create dynamically.
Ok, I can actually see some appeal here, though it's got nothing to do with monkey-patching.