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

 



Forgot your password?
typodupeerror
×

Comment Re:I disagree (Score 1) 270

The recommended break point is as it is with any language - whatever is most readable.

Sometimes that might be the return value being on the next line.

Sometimes it might be each parameter on it's own line.

I myself prefer to either have the whole thing on one line, or everything broken out per line if that will not fit. But I'll admit I let some longer methods sometimes wrap to two lines on the display (even though it's really one long line).

Comment I disagree (Score 5, Insightful) 270

I've done Objective-C since before the release of the iOS App Store, and Swift almost full time since Apple released it last year...

Some of the things you mention beginners do not have to use (generics, and struts for example). To keep things simple to start with, they could just use classes instead.

I will agree that optionals might be a bit rough on the beginner - but perhaps not as starting from nothing, the concept of a bucket that holds a value instead of just using the value directly, would not be so foreign...

You also mention different ways to specify params, and shortcuts - but I see those as a major plus. You can just pick a level of detail that makes sense to you and work with that, until you feel comfortable with reducing further the syntax you use.

I think the function syntax is one of the cleanest and easiest styles to understand... I believe a few other languages have this form also, but in swift you just say something like "a function named takes in these params, and outputs those params" So it looks like:


func myFunc (a:String, b:Int) -> (a:String, b:Int)

it's just so balanced that you can have any number of things in or out.

There are a few things I think make Objective-C less approachable.

The separate header files, and the heavy modern use of private categories to define most internal properties confuse people as to where they need to define things.

Simply more verbose syntax all over. I like verbosity myself, I love named parameters... you get that with Swift though with a lot fewer characters typing.

Part of that extra syntax in ObjC is the shorthand to make arrays like @[] and @(value) to make NSNumbers... but in Swift Integer is treated the same as String, both are first class objects that you can do things with so it's more consistent. That in particular is I think a large benefit for newcomers.

Comment Re:It was an app on a WORK-Issued Phone! (Score 2) 776

Wrapping it in foil means it won't function as anything.

But it also means the work application will not record any downtime for the app running.

If you are "on call" then you are technically working, so that phone needs to be 100% functional and they have the right to track it.

True enough (I totally agree the company as the right to track their own equipment) but if a boss said something creepy like "I can see how fast you are driving" in the bag it would go when I was driving anywhere and I'd just blame bad cell reception on the dropoff... I could pull it out every 15 min or so to see if there were any messages. But it would technically be dereliction of being on-duty...

Comment Re:It was an app on a WORK-Issued Phone! (Score 1) 776

It is important to note, however, that putting the phone in the Faraday bag emulated loss of signal, instead of loss of power,

I was mulling that over after I posted, but after some thought I think that ends up being OK also as it's easy enough to claim your car blocks cellular signals really well or just were in a bad area... at any rate the app wouldn't show it had been shut down which I think would be the main trigger they would get onto you about.

Comment Re:It was an app on a WORK-Issued Phone! (Score 4, Interesting) 776

That's a great point but it does seem like a company should have the right to enable GPS tracking for company assets. Perhaps a good compromise would be that you could indicate when you were off-work to avoid tracking, but if required the device could be signaled to turn back on tracking.

I personally would probably get one of those signal shielding bags and drop it in there when I wasn't to be on-call. Then you could carry it with you even. Then it also appears just as if it lost power for a while, so it would be hard to get in trouble over it...

Comment Re:Because all pixel sizes are equal (Score 1) 93

Reading is one thing, browsing quite another...

Also worth considering - the Pebble display is 30x50mm on the old Pebble, just 20.1x23.44mm on the Time.

The Apple Watch 38mm has a 21.2x26.5mm display, the 42mm version has 2.3x30.8mm...

So the old Pebble is substantially larger than any of the new models, and somewhat easier to read as a result.

I have a Pebble Time on order, it will be interesting to compare... but I just can't see browsing on any of them at all useful beyond something like an RSS feed worth of info.

Comment Re:Because all pixel sizes are equal (Score 1) 93

and frankly you can always bring the watch closer to your face.

You have an unpleasant surprise in store for you as you age. Minimum close focus gets further back, to where you really cannot just bring the tiny screen closer...

Go into an Apple Store, reading the web on that display is just not practical.

Comment Re:Compares well (Score 2) 408

No-fault is about taking money away from lawyers, who used to litigate each and every auto accident as a lawsuit in court before the insurers would pay. Eventually the insurers decided that they spent more on lawyers than accident payments, and they had no reason to do so.

If you want to go back to the way things were, you are welcome to spend lots of time and money in court for trivial things, and see how you like it. I will provide you with expert witness testimony for $7.50/minute plus expenses. The lawyers charge more.

In general your insurer can figure out for themselves if you were at fault or not, and AAA insurance usually tells me when they think I was, or wasn't, when they set rates.

Comment Re:More than $100 (Score 1) 515

If we don't have more than two children per couple, the human race would've died out a long time ago.

I think the proper way to state that is "If we didn't in the past", not "If we don't". If we were to have 2 children per couple (approximately, the real value is enough children to replace each individual but not more) from this day on, it would not be necessary to adjust the number upward to avoid a population bottleneck for tens of thousands of years.

Comment Re:$30 (Score 1) 515

The Northern California Amtrak is actually pretty good for commuting from Sacramento to the Bay Area and back because the right of way is 4 tracks wide in critical places and it has priority over other trains for much of the time.

Acela in the Boston/NY/DC corridor is also good, because the right of way is 4 tracks or more for most of the way, and it has a track to itself along a lot of the route. Other railroads run on parallel tracks.

For the most part, though, Amtrak suffers from not having exclusive track. It runs on freight lines that host cars so heavy that the rail bends an inch when the wheels are on top of it (I've seen this first hand).

Slashdot Top Deals

To the systems programmer, users and applications serve only to provide a test load.

Working...