|
If you're really desperate you can always give Elm a try...
Strongly-typed with type inference. Compiles to JavaScript. Can introduce incrementally, i.e., no need to rewrite everything. No runtime exceptions.
(Disclaimer, I've only had a brief look.)
Kevin
|
|
|
|
|
JavaScript to my experience is like root beer. First taste is bad and saying who would drink such a foul taste drink. But you know what, the more you drink it, you grew to like more and more. Pretty soon you preferred it to other drinks, even genuine draft beer.
I'm having second thought about how bad skunk smell. If you get just a fainted smell, it actually no bad at all. People paid good money for the scent.
|
|
|
|
|
I'm closing on 20 years of JavaScript. You have to accept it as JavaScript, it will solve 99% of your problems. As long as you try to bend it to be C# (or like) you will fail in so many ways...
If you want to feel good with the tools, try using Notepad as editor and never hit F12 while you are in the browser...
After two weeks you will see the benefits of the built in debugger...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I'm not the biggest fan of the language either but it is quite useful. Some of those frustrating bits also give you the ability to do things that simply aren't possible in other languages. That being said, I've really started to like Typescript[^]. It's a superset of JS so you basically just have to read up on how the type system works then you're good to go.
|
|
|
|
|
GKP1992 wrote: if people had the choice of using a friendlier language like C# or Java, javascript would have been in the dumpster by now.
Come on, That is why we gave you Applets, Active-X, etc right?
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy Falcon.
|
|
|
|
|
debugging Javascript in a browser is bad. Which browser and what JS debugging tools did you use if at all?
Some browsers have excellent debugging tools including step by step execution.
modified 20-Oct-19 21:02pm.
|
|
|
|
|
|
JavaScript is around for one reason: To stick it to Microsoft.
There was a time when types mattered (remember why "smart" people hated VB?). There was a time when performance mattered (remember when C++ was cool?). There was a time when user interface standards mattered (Anyone remember UI guidelines?). Now all that matters is having your code - however much of a mess it may be - run in a browser even though if it's a browser running on a PC, 98% of the time it will be running on Windows. But I guess we have to worry about that 2% because it could be Linux! Or, a Mac! Two percent of the market is only a failure if it's Windows phone.
Why don't we write apps for PCs? That only is a smashing success for mobile. It would never work for a PC because....Microsoft owns the PC, and we can't have that. No, let's beat our heads against the wall trying to get some hacked together language to do even the most basic things. <sigh>
|
|
|
|
|
This. Pretty much this. I hate having to do everything on the browser. So much of the last 10 years have just been "not-microsoft", which is a sentiment I understand and get behind (monopolies are bad, but the 1990's are over).Do we really have to go back to the dark ages just to "stick it to the man" ? I hate modern "app" which are glorified browser tabs, taking 1 GB of Ram for a chat app (oh Hi Slack !) and completely failing to integrate into the OS (chromium apps leave pop-up messages open, regardless if you change focus.).
Do we really need 8GB just to browse facebook? Remember the time when your apps would keep 60fps render at all times? Remember when you could use alt-tab ? Good times.
|
|
|
|
|
Have you considered using TypeScript? Several developers I know shifted from JS to TypeScript to better align their OO C# experience with generating JS.
|
|
|
|
|
MSBassSinger wrote: Have you considered using TypeScript?
I have actually, but I'm just a poor developer. However, I have initiated the decision process and now it rests with the managers.
I hope they don't find it too "expensive".
I am not the one who knocks. I never knock.
In fact, I hate knocking. Just barge in will'Ya?
|
|
|
|
|
Yeah it has flaws. Every language and every environment does.
Remember in Cobol, you had to IDENTIFY the target environment!
In ForTran, God was REAL.... Unless you declared it otherwise.
The biggest issue I ran into was some code declared a variable with the same name as a global IE object, and that JavaScript variable did not really work, but the code failed in IE, and worked okay in Chrome.
That took me a while to debug.
But the little I do with HTML, I would honestly die a thousand deaths without JavaScript!
|
|
|
|
|
I'm kind of surprised at the lacks of specifics on this thread. So far no one, including the OP, has indicated specifically what they like or don't like about Javascript or the tools and ecosystem that surrounds it.
One of the things I find most amazing about Javascript is how chameleon-like it is. Folks have created TypeScript, to provide strong typing and a more traditional OO flavor. React and other frameworks rely more on its Functional Programming flavor. Other people have compiled Javascript source into such compact code that the recently released WebAssembly standard is only a minor improvement. People have even made Javascript look like the granddaddy of OO languages, Smalltalk (Amber Smalltalk[^]).
Tools around Javascript also make the language extremely powerful. Flow allows you to find flaws in your code without requiring the explicit type declarations that TypeScript utilizes. WebPack and its many plugins allows you to not only minimize your production code, but you can even create hot-loaded modules so that your enormous web app doesn't have to all be loaded when the user accesses the first page. And if you're generating minimized code, make sure you also generate source maps, so you can debug it so much more easily. Chrome's built-in developer tools are powerful, and I rely on them every day, but occasional glances at FireFox and Edge make me think they have pretty strong debugging tools as well.
There's no way to tell from your post what it is about Javascript you don't like, or how much experience you have with the language, and so its impossible to suggest approaches that might help you deal with your issues. And there's no doubt that Javascript continues to have its limitations. But it still seems to me that Javascript survives not only because it is the only game in town for front-end web programming, but because it is a remarkably adaptable tool that enjoys strong support from a large, vibrant developer community.
|
|
|
|
|
Type safety (aka compile time errors instead of runtime ones). No standardized web bytecode it compiles to like HLSL, Vulkan shaders, .NET, Java, etc, etc leaving huge gaps in a standardized lang and API. Maybe webasm will fix that. O and crap like this: Javascript: the weird parts -- Charlie Harvey[^]
|
|
|
|
|
Who needs type safety, when you have Strings for everything, AMIRITE??? /s
|
|
|
|
|
I think you had a runtime error stringing that together.
|
|
|
|
|
Yes, but only on Firefox, Chrome works so that's all that matters. Edge what?... /s
|
|
|
|
|
The problem is not its limitations. It's the lack of limitations and lack of proper enforcing of a set of rules to ensure behaviour of code. In the web world, they call it Chromium V8, in the rest of the world they call that a compiler.
|
|
|
|
|
|
Message Removed
modified 3-Aug-17 5:52am.
|
|
|
|
|
Message Removed
modified 3-Aug-17 5:52am.
|
|
|
|
|
Message Removed
modified 3-Aug-17 5:52am.
|
|
|
|
|
Slowly I'm getting used to randomly changing display settings. Yesterday I even hit the jackpot twice. All settings were changed at once.
Now I have found some more things wich come and go or don't work at all.
- I can post as much as I like, but the signature does never appear. I just changed the signature again and if it appears under this post, it would work for the first time.
- I can post as much as I like, but until today I did not get the reputation point for posting. Yesterday and the days before I wrote a lot, but there is not a single entry in my reputation history. Today there are.
- I can get as many replies to the posts as I want and I even get a notification that there has been a response - most of the time. But not always.
More and more I feel like I'm in a quantum state. I exist and don't exist at the same time. Only when someone observes me, I'm heisenberged into one or the other state.
And now I'm going to log out and back in, not that this has ever helped in any way.
Edit: No signature!
|
|
|
|
|
My sig works, every time.
Did you change it in your settings, and if so, did you save them?
Look at your response to this: you should see "click to edit signature" which lest you change it for this message, and also lets you see the whole current sig. And below that the preview should show the sig as it will appear.
Ignore rep points, they aren;t important. regrettably, there is no cash equivalent (or I'd post more! )
I'd suggest that this need to be raised - with specific examples - with the Hamsters: Bugs and Suggestions[^] - remember to tell them exactly what hardware and software you are using to access the site, and do mention that this appears to be specific to you - I'm fine as far as I can see.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
Changed like this!
|
|
|
|
|
I just edited the signature in the response. The signature from the settings did not appear. The box was empty.
Just a few weeks ago I kicked about 80000 reputation points into the bucket, so that's really nothing I would cry about. It's just a remarkable symptom that the application logic could not make those entries into the database and now suddently can.
In my programs the application logic would scream bloody murder in the logs if it unexpectedly could not resolve an ID or otherwise not complete a step in the procedure.
OriginalGriff wrote: I'd suggest that this need to be raised - with specific examples - with the Hamsters: Bugs and Suggestions[^] - remember to tell them exactly what hardware and software you are using to access the site, and do mention that this appears to be specific to you - I'm fine as far as I can see. Most probably it's something wrong with my account that sometimes prevents my settings or the signature from being found or database entries being made. I can't say why it comes and goes so randomly, but it does not look like it's a common bug. Just guessing, but it could be an ID that's stored in the view state or session that sometimes is passed correctly and sometimes it is not. And, as I wrote last time, it happens on my notebook, on the computer at work and also my desktop at home.
|
|
|
|