Comment Re:Patience (Score 1) 166
Except that sane people tend not to go crazy without indication. This should allow you to stop the majority of attacks if you keep an ear to the ground rather than waste so much time patting down grannies.
Except that sane people tend not to go crazy without indication. This should allow you to stop the majority of attacks if you keep an ear to the ground rather than waste so much time patting down grannies.
Huh?
Swift is a strongly typed language, though it uses type inference to reduce the amount of characters typed by the developer. Types can be provided explicitly, and for numeric types, specific sized elements such as UInt8 or Int32 can be used.The type engine also provides for Optional valued types; an optional value can be dereferenced with a ? or ! depending on whether the value is expected to exist. The collections in Swift provide literal support for both arrays (with []) and dictionaries/maps (with [:]) and can include generic types.
and
Swift is a strongly-typed language by default; however, it also uses type inference which again reduces code length for developers. The strong type attribute is always in place unless specified by special keyword weak.
Lambda functions are awesome? were you seriously being held back by having to name the function before passing it on as a parameter?
Immutability makes you more productive? in what way?
curious mind wants to know.
It's a combination of fashion, libraries, how big is the improvement over the nearest commonly used competitor, commercial backing, luck, and yes technical merit.
For example, Perl is a language that succeeded on the basis of its powerful string manipulation primitives, which is technical merit, and in spite of its many other technical deficiencies.
..and do you know why is interpreted? because it was supposed to run in countless cable boxes which never did. I know, because I was heard the language design and spec in the pre-WWW days.
Nothing you said there contradicts what are said.
"Fast" is such a vague term as to be meaningless
If only someone could invent an objective measure of speed of execution, using a newly developed unit which we shall call "microseconds" and use that to compare the performance.
On a more serious note, I agree that for many applications time is not that important, but there are many others for which it is. The rendering engine in the browser is one. Any app running in a battery constrained phone is another.
The reason why companies develop new languages is because the ones coming from academia are focused on the wrong things. Product development requires an industrial strength, strongly typed (for the most part) fast language.
Projects coming from academia are interpreted, JVM based, functional, obsessed with (im)mutability, closures, and lambda functions.
This is not to say those things are not nice, however they are not central to a programming language as used in large scale industrial systems.
they could quite literally abolish tuition forever if they wanted to.
You know that essentially they have, right? You pay a much as you can reasonably afford.
Perl, Lisp, Python, Haskell, Javascript, ever heard of them?
Are they "vanishingly few" or rather the most common non-statically typed/untyped languages out there?
As I said, Golang, wift, and Rust on one side, Javascript on the other.
The stupid have stood up and been counted.
type-safety in that "we never add 3 to a string" is only a limited version of what type declaration does. For example, let's say I accidentally have a real variable where I meant it to be an integer, and because of overloading the code never breaks. Yet there is a bug there since my mental model says that i is an integer and sooner or later in my code I will do something incorrect with it which might or might not be caught by the type-inference engine.
On the other hand a statically typed language will catch it right away. and say you said i was an integer, how come you are using it to catch a real value?
Think of statically typing as a massive assert throughout the program that checks for type consistency before shipping the product. In what world would this be not preferable to dynamically typed systems.
I do agree that polymorphism/dynamic typing is needed at times and makes sense to allow it on as a per-needed basis. By default type checking is a must for any program bigger than a few hundred straight lines of code.
Many dynamically typed languages require you to declare identifiers as variables, but don't require you to declare a static type.
If by "many" you mean a mere handful (e.g. Smalltalk) you would be correct.
Also once you declare a variable is it so hard to declare a type, union of types or a polymorphic type? Does it not help in catch bugs? Dynamically typed languages are an academic solution in search of a problem.
If so, then it shows that do not understand what are the two main objectives of a typed language: (1) this is how the name is spelled and (2) this is the type is supposed to carry.
We declare the name and type so that the compiler/interpreter, can let us know if either one is different later on, because we sure didn't mean that.
Type inference systems can determine if you use types inconsistently and that's about it. It cannot check against the original intent.
The fact that people keep on missing the error proves why statically typed languages are so much better.
And it is right there in front of them, not buried in 100KLC as it usually is in real life.
Eureka! -- Archimedes