Slashdot Mirror


User: shutdown+-p+now

shutdown+-p+now's activity in the archive.

Stories
0
Comments
32,254
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 32,254

  1. Re:Good on Restaurateur Loses Copyright Suit To BMI · · Score: 1

    Good for you. And other people do like music. If only we had many restaurants, catering to many different tastes out there!

  2. Re: Quiet schmiet, frosty already on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    This basically defines "strong" as "100% static". Feels like a waste of a term :)

  3. Re: Quiet schmiet, frosty already on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    Sorry, I forgot to actually add an argument to that method call. It should have rather been something like this:

    let foo x z = x#y z

    And then the type of foo is:

    val foo: <x: 'a -> 'b; ..> -> 'a -> 'b

  4. Re: Quiet schmiet, frosty already on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    Duck typing is not implicit type conversion - it's structural typing. And there are statically typed languages which use structural typing, even though they're rare. The canonical example is OCaml, which uses structural typing for its object system. For example, suppose you define a function like this:

    let foo x = x#y

    The # syntax is the same as dot-notation in Simula family, basically. Note that there are no type annotations anywhere. However, this is strongly typed as follows:

    val foo : <x : 'a -> 'b; .. > -> 'b

    What this says is that we've got a function that takes an object that has a method named "x" that takes a single parameter of unspecified type 'a, and returns a value of some other unspecified type 'b (maybe the same, maybe not). That function then also returns a value of that same type 'b.

    You can, in fact, call this function with an object of any class that has a method that is matching these constraints, and 'a and 'b will be appropriately inferred. But in all those cases, all the types will be checked at compile time - because the type is actually there, it can be checked against at every call site. And the <...> notation can be used explicitly to describe object types anywhere, so you don't really have to rely on type inference here (though as I understand, the main reason why they went for structural typing is because it plays well with type inference).

    Another example, which is a bit less clear-cut is TypeScript. It's less clear-cut because typing there is optional and opt-in, but if you do fully opt-in, it's static and strong - but still structural.

    So basically duck typing is yet another axis that can be used to describe a type system: structural vs nominal - and is orthogonal to the static/dynamic and weak/strong axes.

    I agree that the weak/strong is one of the least well defined axes, though. But given the existence of the other two, I don't see how it can be anything other than how types of values (as opposed to types of bound identifiers) are treated. And that's basically whether values are typed at all (to remind, there are languages that only have a single type that's interpreted depending on the context - e.g. Rexx or Tcl), and if they are, then how often that type is actually taken into account rather than being implicitly overriden by the context, as in PHP's arithmetic addition and string concat operators, or C's array decay.

  5. Re: Quiet schmiet, frosty already on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    That is a different aspect of it - dynamic vs static typing. Yes, Python is dynamically typed. I was just pointing out that it is also strongly typed, which is something that most people are confused about, as many (most?) dynamically typed languages are also weakly typed - notably, JS and PHP (which you've used as the other example).

  6. Re:Looked at it. Dismissed it. on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    If you're using regex often enough that you need syntactic sugar for them (and the language in question has raw string literals to avoid unnecessary escaping), then you're the problem.

  7. Re:Objective-C is now legacy - but not quite dead on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    With Obj-C, you can just #include a header for any random C library, and it just works. Does the same work with Swift? Or do you need to manually write external declarations for all the functions and structs that you use?

  8. Re: Quiet schmiet, frosty already on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    It's worth noting that Python is strongly typed - more so, in fact, than Java (which lets you add an int and a string with a transparent but non-obvious conversion - that doesn't work in Python!).

  9. Re: Quiet schmiet, frosty already on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    A reasonable backend for compilers is something that is sufficiently low-level that you can implement most high-level language constructs with minimal overhead. Like, say LLVM, or even MSIL.

    JS, in contrast, is a very shitty backend. The only reason why anyone is seriously doing something in this direction at all is because 1) JS is all that you get in the browser, and 2) JS itself sucks, so there's a desire for a better language.

  10. Re:One more in a crowded field on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    So, basically, mostly like C#, but with reference counting instead of GC.

    The library issue is going to be the main sticking point, though.

  11. Re:One more in a crowded field on Swift: Apple's Biggest Achievement For Coders · · Score: 1

    It is the supreme irony of our times that the best tool to write a portable mobile application is .NET (well, Mono, but ...).

  12. Re: One more in a crowded field on Swift: Apple's Biggest Achievement For Coders · · Score: 2

    This is more or less true for desktop platforms. But for mobile, the design you're expected to adhere to on different platform is sufficiently different (and not just in the way buttons look, but general layout and flow) that an app like that really sticks out like a sore thumb.

  13. Re:The UK doesn't have a 2nd. on Journalist Burned Alive In India For Facebook Post Exposing Corruption · · Score: 1

    When Stalin ruled the soviet union (20 million people is a figure vastly overblown by the way, otherwise USSR would have been depopulated after that and WW2) Soviet citizens actually were armed to the teeth due to a civil war that only ended in in early 1920ies and widespread hunting.

    http://istmat.info/node/31996

  14. Re:ISIS is the bad guy? on US Teen Pleads Guilty To Teaching ISIS About Bitcoin Via Twitter · · Score: 1

    It is true that there are more than two sides, but the other trap that you seem to be falling into is trusting the labels too much. For example, al-Nusra is not ISIS, but a most of what is now ISIS used to be al-Nusra, and then rebranded themselves (the original ISI part is comparatively small). Similarly, while FSA is not al-Nusra, a large chunk of al-Nusra came from FSA - those very same "moderates" that you tried to arm.

    Yes, al-Nusra is better than ISIS. And Assad is better than al-Nusra. Are Syrian moderates better than Assad? In theory, yes, but only if they can actually hold power, and I very much doubt that they could do it unless they were to use the same methods that Assad is using today.

    The West tried to arm and support moderates in Libya. How did that turn out?

  15. Re:Aiding someone in joining an enemy military on US Teen Pleads Guilty To Teaching ISIS About Bitcoin Via Twitter · · Score: 1

    Generally speaking, countries that capture their own citizens who are waging war against them, don't have to treat those citizens as POWs, because they aren't - they're simple criminals, and are under the jurisdiction of regular courts of the country in question. This is not unique to US at all.

  16. Re:That's fine and all on Surface Pro 3 Handily Outperforms iPad Air 2 and Nexus 9 · · Score: 1

    SP3 is noticeably better than the previous incarnations in that regard, largely because of Intel getting their shit together and providing a hardware platform that can actually scale.

  17. Re:Dancing Monkeys and Lawyers on France Claims Right To Censor Search Results Globally · · Score: 1

    Freedom of speech is not important because US thinks that it is. They're just less wrong than the rest (because they still have some irrational exemptions from it).

  18. Re: Russia can't win on 75% of Russia's Satellite Electronics Come From US · · Score: 1

    India is not a country that is seriously in the same league, sorry. It can barely afford to pay its own bills.

    As for China, they don't really need Russia for top end weapons anymore. If you look at their newest military tech, it's pretty much all in-house. Sure, it's based on older Soviet tech that they had - and why not? they would be stupid to start from scratch where they didn't have to. But now they have both the manufacturing capacity to make those themselves, and the expertise to develop it all further. The only thing that they are still interested in from Russia is buying some of the most advanced Soviet tech, and that not to use, but to disassemble and study - and even that interest is fading as the tech in question is aging.

  19. Re:Good Luck on France Claims Right To Censor Search Results Globally · · Score: 1

    Nazism is not "basically Fascism". So much so that Nazis have in fact cracked down on fascists in Austria, for example.

    Fascism is an ideology that puts the state above everything. It's basically pure etatism taken to the most extreme form possible. It doesn't care about ethnicity or race (and this was true in Italy until it allied itself with the Reich, and Mussolini adopted the latter's racial policies as an act of appeasement). It seeks unity solely on the basis of common adherence to that same ideology - it's an open club that anyone can join.

    Nazism is an ideology that puts the nation (defined primarily ethnically) above everything. It also supports a strong state, and in that is reminiscent of fascism and other totalitarian ideologies, but for it the state is not a goodness in and of itself - it's a means to an end, and the end is the prosperity and worldwide dominance of the nation. Thus, it seeks unity on the basis of ethnicity, and does not extend membership to just anyone.

  20. Re:Dancing Monkeys and Lawyers on France Claims Right To Censor Search Results Globally · · Score: 1

    They can serve what they like outside the EU, but not within it.

    You guys might want to talk to Russia about that, I hear Putin also likes this idea and has made some arrangements already.

    Perhaps you could even share a Great Firewall, and split the cost!

  21. Re:$68 Billion for high speed trains on As Drought Worsens, California Orders Record Water Cuts · · Score: 1

    As GP said, because converting salt water into fresh water is a costly process with a significant upfront investment. It can be done, absolutely, but forget cheap water.

  22. Re:$68 Billion for high speed trains on As Drought Worsens, California Orders Record Water Cuts · · Score: 1

    And the fact is: we can live without meat, but can't live without plants.

    We can't live well without either, unless we take supplements.

    (and as to how it is nevertheless possible to subsist on meat alone, ask the Inuit)

  23. Re:Or hey, maybe we need on As Drought Worsens, California Orders Record Water Cuts · · Score: 1

    Freedom to move doesn't mean that you can actually move. Among other things, it requires money to move, and to be meaningful, it requires a job and other arrangements at the destination.

  24. Re:The point is that Russia's tech is crap on 75% of Russia's Satellite Electronics Come From US · · Score: 1

    USSR did that. But today's Russia is not USSR, even though it tries pretty hard to cosplay that.

  25. Re:Russia can't win on 75% of Russia's Satellite Electronics Come From US · · Score: 1

    If China finds itself in, essentially, a monopoly position, they might ask for a very hefty price (as already happened with Russian gas).