Better HN
topnewbestaskshowjobs
Log inSign up

Spykk

0 karma · joined Apr 6, 2012 (14y ago) · 3 submissions

Submissions

comment 13y ago · link · parent

USB was around long before Apple stopped providing PS/2.

If you buy a phone or tablet from anyone that isn't Apple you will very likely get a USB port. If you buy Apple you will not. Trying to argue that Apple is somehow looking to the future by providing a serial bus years after it was the norm is hard to comprehend.

comment 13y ago · link · parent

Are you seriously defending Apple by saying a serial bus is the obvious solution? Apple, the company that has forced rediculous proprietary ports that add zero value into its products while every one else in the space was using Universal Serial Bus? If this post was meant to be sarcastic then I will accept a well deserved whoosh, but ideology trumped engineering at Apple years ago.

comment 13y ago · link · parent

I think dynamically typed languages have become so popular because in simple examples they look great to novices. You don't need to know much syntax about defining variable types, you don't have to type as much, you don't have to figure out why adding an integer to the end of your string won't work, etc. Later, when they try to build something large enough to be useful they realize just how much they traded for that little bit of convenience. For example in PHP:

  $id = 1;

  $dbh = new PDO($connectionString, $user, $password);

  $sql  = ' SELECT column';
  $sql .= ' FROM table';
  $sql .= ' WHERE id = :id';

  $stmt = $dbh->prepare($sql);
  $stmt->bindParam(':id', $id);

  if($stmt->execute()) {
    // Do stuff
  }

  //This echos ID: 1
  echo "ID: $id";

  if($id === 1) {
    echo 'This should be true, we set $id = 1 at the top.';
  } else {
    echo 'Instead we get here because PDO casually changed our variable into a string and "1" != 1.';
    die('in a fire dynamic typing.');
  }