T

Toby Ho

tobyho.com · Personal blog · on HN since 2011

Toby Ho writes programming tutorials, mostly about JavaScript prototypes, functional programming, generators, and static analysis.

What HN saysHN commenters cite his post on how safe different programming languages are in language safety debates, and link his JavaScript constructors article.
18HN people shared it
6linked it in comments
22stories submitted
104story points
9 years agolast shared
2011people per year2026

Most-shared posts

  1. 1
    How safe is your programming
    3 people · first shared 2016
  2. 2
    Javascript Constructors and Prototypes
    2 people · 52 points · first shared 2013 · 51 comments on HN
  3. 3
    Functional Programming by Example (JavaScript)
    2 people · 5 points · first shared 2015 · discussion on HN
  4. 4
    Polymorphism That Just Works
    2 people · 3 points · first shared 2015 · discussion on HN
  5. 5
    What Is This Thing Called Generators?
    2 people · 3 points · first shared 2013 · discussion on HN
  6. 6
    Fun with Esprima and Static Analysis
    1 people · 16 points · first shared 2013 · 1 comments on HN
  7. 7
    Javascript OO Without Constructors
    1 people · 7 points · first shared 2012 · 1 comments on HN
  8. 8
    Promise-based co-routines in Node.js
    1 people · 2 points · first shared 2016 · discussion on HN
  9. 9
    Avoiding Javascript this-hell
    1 people · 2 points · first shared 2011 · discussion on HN
  10. 10
    3 Ways to Discourage Copy-n-Pasting Code in Teaching
    1 people · 2 points · first shared 2012 · discussion on HN
  11. 11
    My js1k Entry: Making Music with the Audio Data API
    1 people · 2 points · first shared 2012 · discussion on HN
  12. 12
    Null Object for Lists
    1 people · 2 points · first shared 2015 · discussion on HN
  13. 13
  14. 14
    Testem 0.1.0 Released and Screencasts
    1 people · 1 points · first shared 2012 · discussion on HN
  15. 15
    Javascript Source Rewriting and Assertions
    1 people · 1 points · first shared 2014 · discussion on HN

What HN people wrote when they linked it

wingi · 2017-07-20
what are your criteria to be a "safe programming language"? - type safety - memory management - compile time help Here are some options: - http://tobyho.com/2008/03/30/how-safe-is-your-programming/ - http://vita.mil-embedded.com/articles/when-programming-language-techno…
wyager · 2016-11-11
That's not what people mean when they refer to the "safety" of a language. https://en.wikipedia.org/wiki/Memory_safety https://en.wikipedia.org/wiki/Type_safety http://tobyho.com/2008/03/30/how-safe-is-your-programming/ The fact that people consider "security releases" for compilers/runtimes to be normal and acceptable is actually extremely alarming to me, but it's different from language safety.
IshKebab · 2016-04-21
Pretty much anything!! Java, C#, Rust, Go, OCaml, Lisp, ... even C++ would be a much better choice. Check this out: http://tobyho.com/2008/03/30/how-safe-is-your-programming/ There also used to be a website that ranked programming languages according to various parameters (which is faster, which is safer) by asking visitors pairwise comparisons (Which is faster - Matlab or C?). I was going to link it but can't find it unfortunately. Anyway I'm pretty sure C would come second-last in the safety ranking, right above assembly.
andybak · 2014-06-28
In some ways Python is more liberal but in different areas - Metaclasses, 'magic' methods (hooking into __getattr__ allows some very clever behaviour), operator overloading, control of the abstract syntax tree and doing crazy stuff with imports. Try doing some of that in javascript. You want prototypical inheritance? Here you go: http://tobyho.com/2009/05/23/prototype-inheritence-in/ Monkeypathing? Nothing forbids it other than a sea of raised eyebrows if there was a cleaner way to achieve the same thing. The only limitation Python has with first-level functions is that they can't be anonymous. I know a lot of people chafe at this but I've never seen any javascript code that wouldn't be improved by removing a couple of levels of nested anonymous functions ;-)
chris_wot · 2013-01-29
You're forcing class based inheritance onto a language that specialises in prototypical inheritance... however, try http://tobyho.com/2010/11/22/javascript-constructors-and/
netghost · 2012-07-20
In case anyone's curious I came across this post about using Backbone for rich command line app: http://tobyho.com/2012/07/19/backbone-charm-text-based-ui Pretty neat, I would never have thought of using it outside the browser.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close