Please create an account to participate in the Slashdot moderation system

 



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

Comment Re:Php tied to platform? [Re:PHP] (Score 1) 153

JavaScript is mostly client-side programming because there are not many viable alternatives for the client of web stacks. Despite the node.js talk, JS is still not popular on the server side.

If something came along to replace or reduce programming on the client side, JS usage could shrink quickly.

Server-side languages are probably safer from UI fads and trends.

Comment Re: oh, yes (Score 1) 173

The polls say otherwise...

Hillary is supposed to be running against the anti-Christ but she seems to be barely scraping by. Perhaps she shouldn't say Trump's name so much. That's a pretty rookie mistake for politics.

DNC arrogance and incompetence is far more of an influence on this election than Putin.

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.

Slashdot Top Deals

No man is an island if he's on at least one mailing list.

Working...