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


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Fix OOP (Re:Null values as errors) (Score 1) 83

As I ranted about in the Java 8 story re lambda hype, the problem is our common languages have a crappy OOP model with "stiff" method definitions.

myFile = file.open(myPath) method openError {display("oh shit!");stop();}

(A "method" keyword may not be needed; it's shown for clarity here.)

Comment Re:Do away with them (Score 1) 83

For one, don't have functions/operations that accept or return nulls.

And we can change the way we think about rows in a table. Instead of this:

{employee name="Martha" salary=70000 birthdate="null"}

Model it like this:

{employee name="Martha" salary=70000}

Comment Do away with them (Score 0) 83

I say get rid of nulls. They cause all kinds of problems and bloat up code. The few times you do "need" them can be handled other ways.

For example, check to make sure the data structure has values (elements) before running an "average" operation on it. If you don't check and there are no elements in it, then it should throw an error rather than produce a null.

Perhaps nulls are used in RDBMS because it's not easy to use conditionals or error handlers in queries to deal with an empty structure or no rows. Maybe have the Average function return two values (columns): one with the result value, and another column with a the count of elements averaged. If the count is zero, then the result value is invalid (not informative), but would be set to zero for consistency.

A potential problem with getting rid of nulls is that languages may have to support them for backward compatibility with existing stuff that produces nulls.

Comment Re:The U.S. ain't perfect, but... (Score 1) 523

As for technical standards: You would have to be kidding. That requires Real genuine expense and effort,

Russia and China have a lot of smart people; more than USA even. And as MS shows, you don't need smarts to divert or muck up standards.

The rest of your arguments seem to assume careful reasoning by politicians before making forking choices. They are politicians: tech logic and rational resource allocation often means shit to them.

For example, Donald Trump, who is arguably on par with Hillary to win the election, wants to build an expensive wall which is relatively easy to breach with tunnels and ladders; when more border guards, drones, and business auditing would be cheaper and probably more effective.

Slashdot Top Deals

If you push the "extra ice" button on the soft drink vending machine, you won't get any ice. If you push the "no ice" button, you'll get ice, but no cup.