Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×

Comment Re:Any insight into language design choices? (Score 1) 339

- Why does Swift have both a "var" keyword and a "let" keyword? One should be sufficient with the other being a default behavior. If a symbol is not declared "var" then just assume it is constant or visa versa. Furthermore, it may not be necessary to have either of the key words because (I think) in every case, the need for variability and mutation should be determinable by the compiler. Type is already being inferred by the compiler, and mutability could reasonably be considered an aspect of type.

Having to use a keyword to introduce a new symbol is a pretty critical reliability feature. If there's no keyword to say "I want to define a variable", then every typo creates a new variable, rather than a compiler error. Lots of scripting languages work this way, and it's hell on reliability.

- Why are Swift collection types like Data always mutable? What happened to the concept of immutable containers from Cocoa. [Yes, I know the "bridged" CF types are always mutable, but that was another bad decision IMHO.]

They're not. That's why you have "var" and "let" keywords. You use "let" for constants, and "var" for mutable objects.

- Swift is intended to be a "Systems Programming Language", is it not? Yet, there is no support for "volatile" variables needed to support fundamental "system" features like direct memory access from peripheral hardware.

"Systems programming" != "device driver development". Nothing above the driver level should be accessing hardware directly, so that's a feature that could likely wait until every other Swift use-case has been addressed.

- Having experienced frustration trying to port high performance graphics code from C/C++/Objective C to Swift, what's up with that? IMHO, Apple's sample code for using OpenGL/GLKit/Metal from Swift leaves the impression that Swift is unsuited to the style of "low level" programming needed/used by OpenGL/GLKit/Metal.

Not sure what the actual complaint is here. Can you give an example of something that's particularly difficult?

- Why not support "dynamic runtime features" like the ones provided by the Objective-C language and runtime? It's partly a trick question because Swift is remarkably "dynamic" through use of closures and other features, but why not go "all the way?"

Part of the goal of Swift is to use compiler "smarts" to generate performant code. You can't really do much in the way of optimizations for dynamic dispatch, so it's not the preferred method. The bindings are there to talk to Objective-C, but Swift-native code is expected to solve those problems another way.

- Finally, a trivial aesthetic critique: Why "var foo : typename" like Ada and Pascal (IIRC) instead of "var typename foo" like every language that inherited C style syntax? Is there an advantage to the Swift approach that I haven't seen, or was it just an aesthetic choice? Did the choice not produce some IMHO "silly" syntax for method declarations with named parameters?

As far as I know, it's purely aesthetic. It's worth noting that type declarations are optional fairly often in Swift, so perhaps it was a decision to try to make the appearance of types less "jarring" where they *do* need to show up.

Comment The random numbers are to mitigate kernel exploits (Score 2) 143

Why does the boot process require random numbers, anyway?

They mention this in the article - one way to make a kernel harder to write an exploit for is to randomize the layout of memory somewhat, so system libraries, kernel tables, and the like are located in different places. Obviously if the "random" numbers are predictable, this makes those mitigation techniques less-useful.

Comment About those margins... (Score 1) 348

But it's far more questionable whether he would welcome the iPhone 5C—almost certainly a low-margin device, despite its current-generation components and plastic body—taking a bite out of the more expensive, and presumably higher-margin iPhone 5S

Seriously? This guys thinks the margins on the iPhone 5c are *lower* than the 5s? In that case, why is everybody else complaining about how expensive the 5c is, and saying it should have been released at a $300 price point? If you believe that the 5c could be made & sold at $300 (and I do), then since it sells at $550, Apple *must* be making something like 40% margins on them. The 5s is $100 more, but I bet it's considerably more-expensive to make.


Submission + - 10-Year Old Girl Accidentally Discovers New Explosive Molecule, Co-Authors Paper (techie-buzz.com) 1

An anonymous reader writes: Clara might just be a normal fifth grade student, but she just got her name into a paper, which she co-authored with Robert Zoellner. It all started in science class when Kenneth Boehr, her science teacher, brought out the ball-and-stick model and allowed the students to just play around. The ball-and-stick models are used to visualize simple molecules and often proves quite instrumental in explaining the angles and lengths of bonds right.

Comment Want to bet? (Score 1) 368

I'd be willing to put a reasonable amount of money at risk predicting that Apple will eventually ship something that's not an iPhone or iPad, which runs the full version of Mac OS X on the ARM architecture. Given how smooth (relatively speaking) the PPC-to-Intel transition went, it'd be a minor speed bump for most developers, not a major disaster. If you're already supporting PPC and Intel, then ARM is just a testing burden - you already need to code for big- and little-endian architectures, for example.

Given the Mac App Store, there's a lot less in the way of friction to just recompile something and put it out there, as opposed to trying to get boxes on retail shelves. Yes, third-party developers will complain, and so will users if they can't get whatever apps they depend on right away. Given that Macs already come with all the basics (email, web, music/video playback), probably 75% of typical users wouldn't even need to buy anything for an ARM Macbook Air to get plenty of use out of it.

Comment More like 6+, depending on what you count... (Score 3, Informative) 368

If you're willing to include software that was developed, but not released, there are:
    m68k (original NeXT hardware)
    i386 (NEXTSTEP for Intel processors)
    Motorola m88k (NeXT RISC Workstation - never released, but a working copy was at Apple when I worked there)
    PowerPC (Mac OS X Server 1.0, later developed into Mac OS X)

Significant bits of NeXT software were also ported to Intel i860 and DEC Alpha, but not enough of the OS to actually qualify as a "NEXTSTEP port"

Comment Enyo 2.0 is designed to be cross-platform (Score 1) 137

I'm not sure I'm understanding the question, here. Do you mean could it be included with Android? Absolutely - the license allows that, though I'm not sure what advantage shipping a version of Enyo with an Android distribution would be. It'd likely be out of date fairly rapidly.

If your question was more along the lines of "will Enyo apps run on Android", then the answer is it depends a bit on what version of Android - there are some significant bugs with some Android browsers That said, the intent is for Enyo 2.0 to be compatible with as many web browsers as possible.

Comment Re:Wow, have you ever read a book? (Score 1) 175

Yeah, the "adult is the murderer of the child' metaphor is fairly common in literature, but it's not something people use in everyday conversation, which is what the dialog in a movie supposedly represents. Like I said, even if Obi-wan is just trying to skirt around the truth, it really doesn't reflect well on him, or on the Jedi in general. Yes "your father is a mass-murderer who turned to the dark side of the force and now calls himself Darth Vader" wouldn't be a nice thing to hear, but keeping Luke's parentage a secret from him is leaving him open to be pretty badly blindsided in the future.

The twin sister bit is also easily explained, Leia shows no signs of being a Jedi, Luke does. It isn't until the expanded universe that sorce sensitivity in Leia is ever mentioned let alone developed as her being nearly as powerful.

Not that it's particularly relevant, but that's simply not correct. Here's what the ghost of Obi-wan has to say about Leia in Episode VI, after Luke figures out that she's his sister:

She hasn't been trained in the ways of the
Jedi the way you have, Luke ... but the Force
is strong with her, as it is with all of your

Anyway, like I said, these are relatively minor nots compared to the problems trying to tie the prequels and the originals together (for example, nearly everything Obi-wan says to Luke in episode IV makes no sense taken in the context of the prequels), but it's pretty clear that the original movie was written as a stand-alone, and the plot twists in later movies were not planned for in the original.

Comment Inconsistencies between IV and V (Score 1) 175

The most obvious problem is that in Episode IV, Darth Vader killed Luke's Father. In Episode V, it's "revealed" that Darth is Luke's father. It's not "impossible" to reconcile, but Obi-wan saying "what I told you was true, from a certain point of view", is an obvious attempt to wallpaper over this inconsistency. Best case, it just makes Obi-wan look like a liar and untrustworthy.

Another issue comes up when Obi-wan's ghost and Yoda are discussing Luke's running off to save his friends at Cloud City:
Yoda: Told you I did. Reckless is he. Now, matters are worse.
Obi-Wan: That boy is our last hope.
Yoda: No. There is another.

Seriously? Obi-wan doesn't remember that Luke has a twin sister?

Anyway, those are just off the top of my head. Nothing like the horrible plot holes ewhen you try to connect the prequels with the original movies, but not great for movies that were made one after the other, a couple of years apart.

Comment The problem is the cost of the batteries (Score 1) 503

Swapping out Li-Ion batteries isn't like swapping out propane tanks. The value of a propane tank is basically $0, plus the cost of the propane. The cost structure on the batteries is exactly the opposite - the charge is essentially free, but the batteries cost thousands of dollars.

In order for battery-swapping to make sense, the same entity has to own all of the batteries, or there needs to be careful tracking and accounting for wear and tear on each battery. Otherwise, there's an economic incentive to cheat.

Slashdot Top Deals

You can write a small letter to Grandma in the filename. -- Forbes Burkowski, CS, University of Washington