logoalt Hacker News

slopinthebag • yesterday at 10:23 PM • 2 replies • view on HN

part of it is because js is a throwing language, and since there are no "checked" exceptions they need to basically rebuild the universe in their paradigm.

but they seem to want to rebuild everything, eg

> The Console service exposes common console methods such as logging, warnings, errors, groups, counters, tables, and timers. Because console access goes through a service, programs can use custom console implementations in tests or other environments. This module also includes scoped helpers that close console groups or timers automatically.

yeah idk mate


Replies

itishappy • today at 12:56 AM

Console is the very core of what I expect an effect system to need to reimplement.

Console is IO and IO is the effect.

spaethnl • today at 12:13 AM

This is super useful though. It allows you to swap out implementations for things like logging and monitoring. Not sure what the confusion is here.

➕ show 1 reply