1,814 karma · joined December 1, 2009
func delete(m map[Type]Type1, key Type)
it could have func Delete(type Type, Type1 somecontract) (m map[Type]Type1, key Type)
in there, and a program compiled with Go 2 would have an implied instance of func delete = builtin.Delete(T, U)
in its global namespace for every map with a `delete` used somewhere in the code.There's still a place for this, even in a Go with the proposed generics.
There's 3 main styles of generics, each with different speed/space trade-offs:
* use interface{}, which runs slower and has no compile-time checking, but can be faster to code
* use the proposed type-safe generics compilation, which generates compact code, but which require more detailed coding
* use the hygienic compile-time macros, which run fast, but can generate lots of bloat when compiling
There's a place for all three being available. So perhaps Go 2 will get macros one day !
That only works with the unstressed vowels [1], so we have "phətogrəphy" because "to" is a full stress and "phy" is a half stress.
[1] Except in NZ English, where the ɪ-sound ("i" as in "if") and schwa (ə) are pronounced the same.
Then we would have come full circle. JavaScript was originally intended as glue for Java applets, but applets never became popular. Instead, Java was used for standalone and server-side codebases, and Beanshell came along as glue code for those. Later, James Strachan added closures to Beanshell's basic functionality, and Apache Groovy was born. Afterwards, Scala became popular and showed that a statically-compiled language could be used dynamically as well, and Strachan said if he'd known about Scala at the time, he'd never have created Groovy. Later, Kotlin showed you could even have builders in statically-compiled code. Now Graal is finally enabling Javascript on the JVM, perhaps selling the idea to developers better than Rhino or Nashorn did.
> walk and modify the AST at compile time
Clojure is best for this. A macro only a few lines long in Clojure will do the same as what a few hundred lines in Apache Groovy are required for. It's possible to walk the AST in Groovy but it's verbose and messy.
> CompileStatic that go a long way
Both Kotlin and Scala are both statically typed from the ground up, instead of having a @CompileStatic annotation tacked on later.
> the brevity and expressiveness of Groovy
Groovy started off in 2003 as a functionally similar clone of Beanshell, which had already existed since 1999, but with closures added. Someone then translated all the standard functional methods from Ruby into Groovy's codebase. Of course, Jython, a JVM version of Python, has been around since 1997. So Groovy is a relative late comer to the JVM in this regard.
Groovy tried to be a bit of everything for everyone on the JVM, but has ended up being used only for 20-line build scripts in Gradle.
Many people refer to Australia as "the 52nd state".
Of course, "Gerald" is an anagram for "Gradle".
Any language that enables dependency injection (e.g. all OOPL's) would help with this.
Virtually every non-technologist businessperson who becomes a manager in the IT industry will present themselves as a technologist. They will usually have some real technical people at their beck and call to help with the stuff they can't fake.
The private use planes U+F8000..U+FFFFF and U+100000..U+10FFFF can be used as the high and low surrogate ranges in a surrogate-pair encoding scheme similar to that of UTF-16. That would give a range of U+00000000..U+7FFFFFFF, which is in 2^31 space. If the Unicode Consortium removed their arbitrary upper limit of U+10FFFF for codepoints, the UTF-8 and UTF-32 schemes as presently defined would naturally fit into this space without needing to use any surrogation. Only UTF-16 would require any surrogation -- its present scheme and those private use planes for a 2nd tier -- but hopefully the use of UTF-16 would be well on its way out by then.
all not == not A and not B == not (A or B)
not all == not (A and B) == not A or not B
Seems to work in other natural languages besides English, e.g. 都不 vs 不都 have same variation in meaning as in English where 都="all" and 不="not".You're writing it wrong -- it should have a comma in there to denote the pause: “Would you like the red shirt, or the blue shirt?”
Are you also speaking it wrong? The part before the pause should be spoken with tone going up, and the part after with tone going down. If you're not pausing and changing tone, then the correct answer is either "yes" or "no", or repeating the whole thing back to mean "yes".
Obviously, the bikeshare companies roll out their newest stock in Beijing and Shanghai. I'd guess most Ofo bikes in all of China still use the manual unlock, and will do so for a while yet.
At least Python's backers had the guts to release a breaking version 3, unlike some other dynamic languages, specifically Ruby and Apache Groovy. Ruby's backers have tentatively slated 2020 for a (MRI) Ruby 3 release after two more Ruby 2.x versions. As for Groovy, 2 months ago its backers canceled its version 2.6 release which was to backport the planned features of Groovy 3 into a JDK 7 compatible release. Looks like we won't be seeing version 3 of either language anytime soon.