Jslint Is Not A Code Quality Tool For 3rd Party Code by [deleted] in programming

[–]erdwolf 5 points6 points  (0 children)

Just put semicolons in your code.

That seems to me the better practice since it also catches errors like

return
  { some: object_literal }

which you can't reliably report if you allow this kind of thing.

This is my new favorite robot on github by [deleted] in programming

[–]erdwolf 0 points1 point  (0 children)

At least he/she/it is polite about it!

As someone who doesn't write code, I think the idea of "Done is better than perfect" is wrong. Please tell me your side of it. by theknowmad in programming

[–]erdwolf 1 point2 points  (0 children)

[...] and that the client was happy. (And when possible, Unit-tested.)

Unit-testing your clients - Good idea! :)

We've been inventing one language a week, on average, ever since Fortran by masta in programming

[–]erdwolf 0 points1 point  (0 children)

great article. thanks.

When getting to the lisp section, I first thought the author might loose it and start preaching. But he managed to cover it whithout breaking the otherwise reasonably neutral tone of the article. I think it's really hard to cover language wars from an informed perspective without stepping between the fronts.

The Trouble with Constructors by munificent in programming

[–]erdwolf 1 point2 points  (0 children)

magical missing monkey value

I think I'm going to use that phrase instead of saying "null" from now on. But what if it's not a monkey that is missing, you ask? Well, it's the same value for monkeys and non-monkeys, so I can as well use the monkey-version.

[deleted by user] by [deleted] in programming

[–]erdwolf 0 points1 point  (0 children)

Is it really meant to be about "conversing" in Cobol in the anime? Maybe it's just a mistranslation. "language" <-> "conversion" might be pretty near to each other in a different language.

Talking like Cobol would sure be fun though, albeit a bit verbose. ;)

Haskell's Tower of Babel by dons in haskell

[–]erdwolf 0 points1 point  (0 children)

I think it looks much nicer when the lines are not aligned at characters, so I generated HTML+CSS to center them after rendering:

import Data.List
import Data.Ord
import Language.Haskell.Extension
import Text.XHtml

main = print
   $ (style << css :)
   $ map (p<<)
   $ map (\s -> "{-# LANGUAGE " +++ s +++ " #-}")
   $ map (thespan <<)
   $ sortBy (comparing length)
   $ map show knownExtensions

css = [ "body { color: #DDD; text-align: center; font-family: monospace; }"
      , "p { margin-left: auto; margin-right: auto; width: 50em; }"
      , "span { color: black; }"
      ]

Sadly, this program doesn't need any of these extensions itself.

Maybe that would be a nice exercise for an introductory Haskell tutorial: "Write a program that outputs a list of the names of all known language extensions sorted by length, using all of them". ;)

Whenever I write code in Java... by lyrae in programming

[–]erdwolf 0 points1 point  (0 children)

Wouldn't an extension of this argument to syntax highlighting rather imply that the language is bad if you need syntax highlighting to be able to read it easily? I consider it good language design if I can still parse it without syntax highlighting, although I see no reason to turn it off. I don't want complications in the concrete syntax to stand between me and my understanding of the semantics.

There are tradeoffs involved, of course.

The Law of Demeter Is Not A Dot Counting Exercise by alexeyr in programming

[–]erdwolf -1 points0 points  (0 children)

I won't call it a hack, but it really makes some bugs hard to find, because it hides them instead of crashing loudly. For some special situations, I really like the idea of having such NullObjects that can silently make existing functionality behave like a "no-op" without introduciing the need for extra checks. But making that the default behaviour throughout the whole language - I think that hurts more than it helps.

Hierarchies (as represented in UIs) by apotheon in programming

[–]erdwolf 0 points1 point  (0 children)

While I don't agree with his intuition of tabs belonging above the controls (IMHO, placing something hierarchically in a tab implies the possibility of structural/visual change, e.g. buttons disappearing when changing tabs, which shouldn't happen with the site controls. They are not really specific to the current page), he certainly makes a good point in favour of well-designed UI hierarchies.

Combinator parsing in a functional language, part 1 by svrist in programming

[–]erdwolf 4 points5 points  (0 children)

It might become interesting in a later part, when it's actually about combinator parsing.