TS is “better” but often I feel like just configuring typescript takes up a significant amount of the time you save by using it.
TS is “better” but often I feel like just configuring typescript takes up a significant amount of the time you save by using it.
Just as JetBrains is not representative of every dev, neither are LSPs. Some developers want a specialized IDE for their language(s), some want a highly customized editor with their language servers. As long as you efficiently produce code that works, who cares what other people use?
You could do HTMX and WASM, but they both have the same problem in that they generally replace elements in the DOM as opposed to interacting with existing elements in the DOM, and most rendering on both HTMX and WASM actually happens through JavaScript calls.
In either case you’re limited to only interact with the DOM at the level of abstraction that the framework provides through “behind the scenes” JavaScript calls which will always be a subset of the DOM manipulation that is possible by directly using JS. At least, until there’s a standard DOM access API for WASM.
It’s not a question of performance - it’s just the fact that you need to use JS to modify the DOM in WASM. Until there is access to the DOM from WASM, there simply will be a place for JS in nearly every web app and it’s not because it’s fast, it’s because there are still certain things just need to be done using JS.
My point is really nothing to do with performance and I agree with the video you’ve linked: WASM is fast enough today. Whenever you can truly stop using JavaScript, I’ll be the first in line. You can already use WASM and eliminate huge portions of JS - but for anything beyond a very simple UI, you always end up with something that needs to be called in JS.
WASM’s biggest holdback is that it cannot directly access the DOM. Until then, JS will still have a prominent place in building anything rendered in a browser.
But have you heard of Rust? Rust has zero-cost abstractions! Zero cost!
Honestly, “it’s better than JavaScript” is a pretty low bar.
I don’t like PHP because I think the syntax is ugly and I’ve only used it on systems that are old and a pain to maintain, but I’ll also very freely admit that I have absolutely not written enough PHP to have an informed opinion on it as a language.
At that point, just make a typescript engine so people don’t have to build their TS projects anymore
I agree! I don’t think 3?”stuff”:”empty”
should work at all because I think it’s an insane way to type a ternary :) I’m also very open to admitting that it’s just my own strongly worded opinion.
I think that in most cases, syntactically significant whitespace is a horrible idea - the one exception being that you should have space between operators/identifiers/etc. I don’t care how much, and 4 spaces should have no more special meaning than 1, but I do think that using a space to indicate “this thing is a different thing than the thing before it” is important.
I can’t imagine anyone but a total novice disagreeing with this.
I can understand finding pointers hard at first, but I can absolutely not understand trying to argue that they aren’t useful.
Can you clarify what you meant about types, then? Because I’m not sure I really understand your point there.
Personally, I think that if you’d rather write foo?a:b
than foo ? a : b
, you’re probably insane
Not who you asked but I think they’re important for humans, but syntactically I don’t think they should matter.
It should be ok to add a line break wherever it makes the code more readable, but I don’t think a compiler should care whether some code is all on one line or 10
Mostly agree. I’m ok with single characters in a one line / single expression lambda, but that’s the only time I’m ok with it.
1 hundredweight = (1 qt * 32) + 100.7, of course. It’s very intuitive.
That’s a little pedantic, don’t you think?
By necessity, when you’re in the debugger your code has already been compiled either way, no? Or am I missing something here?
This isn’t executing your code as you’re writing it (though it does support Edit & Continue), this is preemptively executing the next lines in your code when you’re already paused in the debugger - which means it’s been compiled and already running.
“Self-documenting” just means “(I thought) I understood it when I wrote it, so you should too”. In other words, it really means “I don’t want to document my code”
My favorite approach I’ve seen is just units of time -“this task will take a few [days/weeks/months/years]”.
No specific number. Instead, the scale of the task is measured in one of those units and I can give you an estimate but it’s just a guess.
If it’s task that might take “a few days”, it could be done tomorrow or it could take 5 days. If it’s one that takes “a few weeks”, it might be done next week or maybe next month.
That’s because it makes sense when dynamically creating HTML. HTML is not a programming language, it’s simply markup - so if you want to generate some block of HTML in a loop and later access that block of HTML in JS (e.g. to interact with the UI separate from creating it in the first place), it’s a completely reasonable thing to do.