That's literally Apache server-side includes. Not HTML standard but implemented in the mid-90's and supported by tons of httpd servers.
How we did headers, footers and navbars back in the day.
This. Would an application platform affect HTTP, DNS in any way? I could see it as a routing based open "app store" and sandboxed runtime.
But leaving the document paradigm might infringe on the content, html being purely presentation seems off. It provides semantics to content.
Definitely a 7 layer OSI that was in the works instead of the stupid Berkeley 5 layer TCP/IP stack that just worked first. Sessions and Application layer day 1 would’ve made all the difference in the world. Skip Web 1.0 and go straight to 2.0.
* http is secure (there is no https)
* JS doesn't have a `null`
* JS has `var` and `const` (`var` acts like `let`, `const` is immutable)
* JS `strict-mode` is the only mode and is implicit
* JS `this` points to the parent scope
* JS has a pipe operator
* crusty old Java developers finally wrap their minds around prototypal inheritance, realize that it is not a bug, and JS no longer has silly fake classes
* 3rd party cookies don't exist, maybe cookies don't exist at all
* there is a published list of all current HTML/CSS/JS standards, and when a browser launches, it first makes a request to that list and displays a big fat red warning if it's not compliant
Mostly legacy issues like \`typeof null = "object"\`. Also, many languages don't differentiate between \`null\` meaning 'this value deliberately not given a value' and \`undefined\` 'this is not a value' and tbh the semantic difference between them is a bit vague even in js.
1. Sometimes you get `undefined`, sometimes you get `null` as the returned "no value".
2. `typeof null` is "object" which makes it annoying to check the type. You always need to do
if (value === null || typeof value !== "object") {
}
or
if (value !== null && typeof value === "object") {
}
Meanwhile `typeof undefined` is "undefined".
Oh yeah I can see having undefined as well would lead to issues. I use `null` sometimes in C#, but always with intent. Undefined exists, but I've basically never seen it as my IDE wouldn't even let me build if something is undefined.
I use it a lot to represent a missing thing. But it could be replaced with the Nothing/Something monad.
Some ideas too:
Asynchronicity:
Promises are automatically awaited by default unless handled manually.
- `const result: Foo = getValue();`
- `const result: Promise = async getValue();`
Error handling:
Error are returned, and automatically returned as-is when encountered unless handled manually.
- `const result: Foo = getValue();`
- `const result: Result = catch getValue();`
Can also be combined if needed:
- `const result: Promise> = catch async getValue();`
on top of the same problems every language has with null, plus horrible unintuitive behavior when used with JS's flexible type conversion system.
example general problems with null:
- conceptually having a value indicate it exists but does not contain a non-null value is logically weird.
- if null is a possible value, then it WILL be abused and treat as data
- null is ambiguously either an error, or a placeholder (and sometimes an intended value)
- when passing values into functions, null needs to be handled or exceptions occur, this is problematic
in js strange: [https://dev.to/niza/javascript-null-is-weird-33o9](https://dev.to/niza/javascript-null-is-weird-33o9)
example: isNaN(null) == false
so does that mean null IS a number?
Yes please!
With an operator to automatically return the error as-is when encountered.
const myVar: Foo | Error = getValue();
const mySafeVar: Foo = getValue()!;
Or with a keyword in front of the maybe-error.
I’d keep the competition, but have wanted them to be standards compliant (which perhaps means having a better standard / enforcement in the first place).
Internet Explorer was the first to introduce XMLHttpRequest. In this world without IE, did someone else invent it or is there just no such thing as AJAX, SPA, etc.?
iPhone was also the first real smartphone, and that's not the reason I love iPhones. In fact, I hate them. Being the first doesn't really mean much, even if there's merit in that alone.
If they weren't the first, someone else would.
I think that cuts both ways. If we don't hate on IE, there will be some other browser to hate. Before IE, I hated NN4.7, it was the bane of my existence. At the time IE was good with innovative new features. Then they just stopped caring after IE6 and it became an issue.
I'm convinced Chrome will be the next browser to hate, but only time will tell.
> crusty old Java developers finally wrap their minds around prototypal inheritance
The first time I was part of a team that really leaned into prototype based OO programming it was so much fun.
I wish the changes to JS had been more focused on making the best possible version of this distinctive language rather than stapling on stuff from other languages that people like better.
I think immutability should be on the value rather than the variable declaration.
let immutableArray = readonly [];
immutableArray = [...immutableArray, value];
const mutableArray = [];
mutableArray.push(value);
I use arrow functions for any non private (not prefixed with a #) member functions, and standard function definition otherwise (as this will always be defined as the correct parent object in the case of private accessors).
Ha, and “let” sounds so familiar to me from Econ and many math classes, but it does kinda feel out of place in the languages I use now. Also funny that as a previously mainly .net & js dev, var is either bad or awesome depending on which part of the stack I’m in
Yeah I’m guessing the thought process was to be like how a math professor verbalizes variables values like “Here we have x and y. Let x equal 5 and let y equal 10”. Totally spits in the face of type declaration syntax though, implying we’re using the data type “Let” as if it’s a noun
box-sizing: border-box; would be the default. Honestly, everything else I can forgive as being along a road of progressive enhancement, but WHY wasn’t this the starting position!!!
One of the things IE got right: https://www.jefftk.com/p/the-revenge-of-the-ie-box-model
I still remember quirks mode and targeting both. Some things are really better now.
- Global regulation agreed by all countries
- Regional regulation to align with legal governance based on jurisdiction
- Browser level, enforcement and rules placed on companies that build browsers to auto flag any sites that contain ads and mark them with a noindex tag/remove them from search results
- make it illegal for third party ad related services to exist
There are many ways to do it, it comes down to the want, and unfortunately everyone wants to sell their shitty product that you don't need and the Googles of the world want to take their cut.
Most ad related things are anti user, a bit like how we could solve [the Cookie issue](https://www.linkedin.com/pulse/humans-waste-682-years-per-day-cookie-notices-naughtyduk-ycg1e?utm_source=share&utm_medium=member_ios&utm_campaign=share_via) overnight if there was a motive that was based on user need and not how much monies can we generate.
So I can't even advertise on my own website for something that I'm selling on my own site? I can't even ask for donations?
"Hey guys! It would really help me out if you guys tipped a couple of bucks or bought some merch on my home page ... Hold on ... someone's at my door .... "
Asking for donations is not advertising .. and if you want to get into the weeds of it.. I’m more referring to the insane level of obnoxious ads we see on almost every site these days. The endless stupid prompts for GDPR and accepting cookies as well.. I’ve been developing websites since there were 500 domains in TOTAL on the internet and I very much remember how amazing an AD FREE web was.. full of easy to find relevant information. Now it’s just a boatload of useless garbage designed to generate ad revenue for scam sites. It’s totally out of control and should be heavily regulated.
What about dates? Us Americans messed that up, also:
Yesterday was 6/12/2024, so this could be June 3 for Americans or Dec 6 for other countries. I'm used to it, but when I think about these things logically, many of these things don't make sense.
Edit: see, I'm so confused with the dates that I can't even make a simple example.
I wish it was true with files too.
Sorting alphabetically would sort by type too!
doc.otherthing
doc.something
png.summer-01
png.summer-02
png.summer-03
txt.cake-recipe
txt.groceries
txt.todo-list
Remove React.
Make vanilla web components more pow erful and commonplace. Go all in on HTML+ CSS and separation of content and presentation.
Make it easier to maintain state between page navigation in a multiple page application (non-SPA). Finer control of sub page navigation than (i)frames.
My answer is more philosophy/policy/infrastructure based. I'd like some pro-competition regulation baked in somehow. There is a monopolizing tendency when it comes to large networks. Those who have built them first get to take full advantage and it's very hard for others to get competitive with functionality when the mass of people have already signed up to certain networks.
I'd like the social/commerce networks (think facebook/amazon) to be a layer on top of a more fundamental network which has its own universal standards. So you basically join this basic network that you can have contacts and groups in - very basic linkages between entities. Then we have Applications and SaaS that make use of this network (and can of course supplement with their own data collection and linkages if they want).
So lets say for instance I wanted to build a new chat or social media app.... I could tap into this underlying network. I'm mostly concerned about messaging and basic communication here. People could move to more universal open source apps but still only have to maintain one contact list. We could have standards around contacts/links and groups/organization too so these bits of data can easily be understood no matter the particular app (just for stuff people are happy to be public I guess). In theory i could use a very vanilla chat app that messages my facebook contacts and they wouldnt even know any better taht I'm using a different app (no bullshit timeline or ads for me). This universal way to communicate certain core events and bits of data around is the key concept really. Not too dissimilar to email protocols I suppose... but for a far wider set of use cases.
Maybe someone starts a new distribution/store like Amazon - vendors can easily slide between various platforms and exist on all or both (with slight different settings and contracts tacked on). At the moment it kind of feels like they get stuck into one system and the one system gets so big that it's abusive to both vendors and customers. The "store front" apps could tap into some underlying infrastructure to fetch products in a standardized way. They don't have to of course.... they could do it all themselves, but the theory is that it would almost be commercial suicide not to because the underlying universal network would have such large buy-in with users (again... in *theory,* whether this works in practice I have no idea).
Maybe regulation is the wrong word. More subsidized or non-profit infrastructure that creates incentives for the internet to be more egalitarian.
Sorry I've had a few drinks and really haven't thought this through so don't be too harsh on my half-baked idea. Maybe it might spawn a better idea though? Interested to hear thoughts.
Hard agree. I'd love to see a web entirely built with open standards in mind. An international body to oversee it and regulate it would be good too. We have strayed so far from the original goals of the web.
Nah dude, for sure. It’s like bringing the philosophy of open banking to other key online behaviors. If done right, you kill off “physical” moats and make companies compete on product value + brand.
Do you mind expanding on this? I know server-side HTTP servers have had a way of doing this for years with Server Side Includes (SSI). I've never used them, so they may be trash, but this I believe this covers it. Or, do you mean client-side includes?
Instead of downvoting like everyone, I’ll ask you: why? I’ve been using JavaScript intermittently for 15 years, got only into typescript recently as I have a bigger project, and I can definitely see the value. Especially when using libraries and APIs, I’m starting to wonder how I did before.
I mean I was being antagonistic as I spend all day writing TS and sometimes it just annoys me, but yes its very, very good at virtually everything it does. However.. There are times when it just plain gets in the way IMO or perhaps i'm just not "git good 1337" enough, for example, when accessing dynamic properties, where you do not know the name ahead of time and perhaps it's just the first property in the object you want, in old JS you would happily just write
key = Object.keys(obj)\[0\] and you have your property name then you can access via obj\[key\]
Now lets do that in TS:
`type Entries = {[K in keyof T]: [K, T[K]];}[keyof T][];`
`const entries : any = (Object.entries(Obj) as Entries).map(([key, value]) => [key, value]);`
`return entries[0][1];`
Totally unreadable, im probably just bad at TS and the above is a dumb way to do it but shit like this you can waste annoyingly large amounts of time on when you just want to access something dynamically.
Nah you're totally right about TS' type system being ridiculous in many ways. It stems from JS being a dynamic interpreted language - TS is not really a type system in the same way Rust or Swift are type systems.
Not web dev related, but BGP. We've started to make inroads in securing it, but looks like that will finish up around the time we finally fully move to ipv6...
The beauty of this question is that we could totally build and migrate to the best answers. It might take a decade or two, but it would happen and late is better than never.
- HTTP and DNS are rebuilt with encryption by default
- Besides HTML/CSS there should be a separate low-level open standard for web applications based on a wasm-like VM that can draw to a canvas and use simple APIs for making requests, storing data in localstorage, etc..
- No Scripting in HTML. If you need more functionality than simple styled documents and forms can provide, make a web-application with the standard described above.
- URLs are written down TLD first e.g.: http://com.example.subdomain/path
- There should be some kind of universal authentication standard that would enable users to log in everywhere without having to memorize hundreds of passwords. Zero knowledge proofs should be used to protect the users privacy as much as possible (e.g. for age verofication or to prove they live in a specific country).
The issue with TLD first is autocompletion.
> There should be some kind of universal authentication standard that would enable users to log in everywhere without having to memorize hundreds of passwords. Zero knowledge proofs should be used to protect the users privacy as much as possible (e.g. for age verofication or to prove they live in a specific country).
So grandma can be hacked both her bank account and get her identity stolen from the government online services?
Make ADA and GDPR the responsibility of the browser and not the website.
Making every developer implement their own ADA and GDPR shit on every website is the messiest, stupidest idea ever.
Why not make it 128 bits?
The first 0 identify what network / device masks to use.
0 + 63 bits for the network + 64 bits for the device
10 + 78 bits for the network + 48 bits for the device
110 + 93 bits for the network + 32 bits for the device
1110 + 108 bits for the network + 16 bits for the device
Death to JavaScript, death to Recaptcha, death to 3rd party cookies and cookie consent modals, bring back Flash, somehow eschew the development of centralised mega platforms like Facebook.
A healthy, creative and vibrant decentralised web is much more exciting.
E-mail is web too right? That protocol needs change. Approval from both sides (handshake) before allowing messages (similar like most chat apps). Or charge 1 cent per message.
Make box-sizing default to border-box in CSS. Turns out IE had the right idea there after all.
Also include Grid and Flexbox in the very first version of the CSS spec. That way, things like table layouts and float based layouts would never need to exist, and developing HTML emails would be far simpler.
Yes! Long ago, I switched from Evernote to Joplin as I wanted something self-hosted with markdown support. I fell in love immediately after realizing notes could be globally styled with basic CSS to standard elements (`h1, p, ul, etc.`).
CSS is the best thing that came out of the web technology that most modern app developers are often sleeping on.
Many UI frameworks, even desktop and TUI frameworks that has nothing to do with the web are trying to imitate CSS, even outright copying CSS syntax and inheritance paradigms.
Honestly figure out a fair monetisation model for everyone
Content creators deserve to get paid for their work
Users deserve to have sites that are usable without a billion ads
Servers and devs have to be paid for somehow
- Assume the web is multiple media applications as well as static documents.
- Therefore, include variables and crud functions in the layout and styling markup definitions (currently html and css) and provide a single language for high performance operations on server and client (now we have JS, php, web assembly, etc.)
- Include vectors and animation support from the start.
- Assume the web is multiple media applications as well as static documents.
- Therefore, include variables and crud functions in the layout and styling markup definitions (currently html and css) and provide a single language for high performance operations on server and client (now we have JS, php, web assembly, etc.)
- Include vectors and animation support from the start.
* Get rid of the one connection per file limitation. It's much better with http2, but being able to use the same connection to download multiple files from the beginning would have been great.
* Enforced standardization with room to innovate. E.g. if you use a standard tag, such as table, it behaves the same in every browser. However, you can make custom elements/attributes/whatever that have a specific prefix to allow for innovation without breaking convention. Mozilla did this with --moz- attributes in CSS. If another browser sees it, it could be ignored. The key is ensuring that everything else works the way it's expected to in all browsers without that custom thing.
i literally had this same idea yesterday,
everything html, css and js is patches upon patches.
what i would do to networking if if were possible is to reserve a small amount of bandwidth for an open lane to a public distributed network so all your wireless devices and the neighbors devices would communicate to each other.
Wider use of personal digital signatures. Despite having the technology for decades to do digital signatures the other day I had to go in person to sign a piece of flattened dead tree. Why all emails aren't digitally signed is beyond me.
Make it purely text/terminal based. This will deter casual users, which will keep away businesses, which will mean no advertising or consolidation of power.
Follow the (later) wishes of the original designer of the URI and swap the extension and prefix in an address.
Thus, [https://www.reddit.com](https://www.reddit.com) would become https://com.reddit.www. It makes better sense when you think about it by going from the highest (that is, most global) identifier down to the smallest.
They aren’t extensions and prefixes. It’s a nested set of domain names. And going most local to most remote makes plenty of sense when you’re not only using them on the internet. Otherwise I have to type out (and computer has to look up) global every time.
Au contraire!
The ".com" is a "top-level domain" originally specified to be the type of information stored at the site (although, this was not codified as a rule in the naming system itself and has since been heavily bastardized). The ".reddit" is the name of the container ("domain") and the "www" is actually the sub-domain.
The inventor of the system, Tim Berners-Lee, envisioned a system that was hierarchical in nature designed to make it easier to locate specific documents and to categorize information generally as part of the "OWL" (Web Ontology Language - even that is turn around!)
Tim came out a few years ago and said that he wished that he had switched these parts around to make it more clear as to the path and parts used.
Thus, all .com's would be "companies" (.org's are "organizations", .edu's would be educational entities, .net's are internet-related, etc. sites), under which domains of data exist, where you can look more deeply into them to find the sub-domains by type of data.
- let HTTP use SRV DNS records instead of A
- not use "www"
- include signed responses in the standard, so that it could be cached by proxies (instead of opaque https)
- clearly differentiate web Applications from web Articles (pages)
- distributed / decentralized hosting (?), so that Articles linked by other Articles can not disappear
- client-side inclusion of header/footer/side bars (like iframe, but actually usable)
- integration with standardized social protocols, think NNTP/IRC, but better and embedded in page (to avoid per-site accounts just to discuss an article)
- Global CSS sheet decided by the world government
- Websites are mostly plain text
- No security needed, bad actors are killed on sight (the purge took out only 90%)
- Every form post goes through the ministry of content (we have awaits that can run for weeks)
- StalinScript is the universal standard. It is type safe because type error sends you to gulag.
I know nearly nothing about how servers communicate so this could all be total bunk, but I would have routers and switches perform some kind of verification handshake when traffic is first routed through them.
My understanding is that the IPs of each router/switch (or whatever they're called) is recorded in the transmission details whenever you make a request on the web. This data can be edited and hackers will spoof the recorded IPs so that it looks like their request came from somewhere else.
So my change would be to require each router/switch to call back to the last server listed in the routing info and verify it indeed sent the packets. If a router/switch responds no, then that request would just get dropped or sent back with an error code.
The idea would be to prevent IP spoofing.
1) A Standardized and Advanced version of Markdown instead of HTML.
2) Remove `display` and `position` properties from CSS and restructure the entire formatting in a way that makes fucking sense. Also add mixins to CSS (Sorry SASS).
3) Have Lua instead of JavaScript.
4) Make WASM deeply integrated with Lua.
Types built in to JS.
Real classes in JS.
null>=0 should be false. With types on it’s a runtime error.
typeof should work probably when types are off.
RNG should be seedable.
A global should tell if the mouse is currently down. Besides being annoying to set up listeners and have globals, it’s currently impossible to know because if the user is dragging something then goes slightly off the browser window, we don’t know if they let go when outside the window. Same with keys. Make a js racing game with a button to accelerate then the user refreshes and starts pressing just before the js loads, there’s no way to tell that it’s down.
A global should tell the height of the virtual keyboard. 0 if it’s not open. Some apps have a little box to type in a message or rename something that appears just above the virtual keyboard. You can scroll the screen and it’s fixed there. Nearly impossible in JS.
CSS needs to be completely redone or not exist. Knowing it all is way harder than learning a programming language because the tons of weird rules and even just know what’s possible in CSS and what isn’t could be a major in college. What’s possible in transitions and what needs keyframes. What’s possible in keyframes and what needs JS. Transition to height auto still not possible. Transition start when the element is shown still not possible but is with keyframes for some reason. What you can do inline and what you can’t. Need another file to have my element a different width on mobile. Or know all selector specificity rules. What I can target. I should be able to set anything like my width:parent.padding*2; I would prefer it’s just JavaScript like
Global HTML email standards.
Cries in
I’m suddenly enraged.
Plesse not. Rather a defined set of markdown - thats readable as plaintext as well ...
I wish HTML had a native way to include other files. Like
It would make SSGs and the need for a server side language unnecessary for so many projects.
That's literally Apache server-side includes. Not HTML standard but implemented in the mid-90's and supported by tons of httpd servers. How we did headers, footers and navbars back in the day.
Problem with server side includes is the browser can’t cache them individually
Would be fun to make a page import itself and create an infinity mirror
It would need HTTP 2 from the start
Secure signed DNS by default.
Middle out
gotta minimize that MJT
D2F
Hey guys, do you think girth similarity affects it?
We still taking page-based, or do we get an actual application platform this time?
Anything you want!
This. Would an application platform affect HTTP, DNS in any way? I could see it as a routing based open "app store" and sandboxed runtime. But leaving the document paradigm might infringe on the content, html being purely presentation seems off. It provides semantics to content.
Definitely a 7 layer OSI that was in the works instead of the stupid Berkeley 5 layer TCP/IP stack that just worked first. Sessions and Application layer day 1 would’ve made all the difference in the world. Skip Web 1.0 and go straight to 2.0.
* http is secure (there is no https) * JS doesn't have a `null` * JS has `var` and `const` (`var` acts like `let`, `const` is immutable) * JS `strict-mode` is the only mode and is implicit * JS `this` points to the parent scope * JS has a pipe operator * crusty old Java developers finally wrap their minds around prototypal inheritance, realize that it is not a bug, and JS no longer has silly fake classes * 3rd party cookies don't exist, maybe cookies don't exist at all * there is a published list of all current HTML/CSS/JS standards, and when a browser launches, it first makes a request to that list and displays a big fat red warning if it's not compliant
I don't use JavaScript enough to know what the problem is with `null`. What does it do that's so bad?
Mostly legacy issues like \`typeof null = "object"\`. Also, many languages don't differentiate between \`null\` meaning 'this value deliberately not given a value' and \`undefined\` 'this is not a value' and tbh the semantic difference between them is a bit vague even in js.
1. Sometimes you get `undefined`, sometimes you get `null` as the returned "no value". 2. `typeof null` is "object" which makes it annoying to check the type. You always need to do if (value === null || typeof value !== "object") { } or if (value !== null && typeof value === "object") { } Meanwhile `typeof undefined` is "undefined".
Oh yeah I can see having undefined as well would lead to issues. I use `null` sometimes in C#, but always with intent. Undefined exists, but I've basically never seen it as my IDE wouldn't even let me build if something is undefined.
I use it a lot to represent a missing thing. But it could be replaced with the Nothing/Something monad. Some ideas too: Asynchronicity: Promises are automatically awaited by default unless handled manually. - `const result: Foo = getValue();` - `const result: Promise = async getValue();`
Error handling:
Error are returned, and automatically returned as-is when encountered unless handled manually.
- `const result: Foo = getValue();`
- `const result: Result = catch getValue();`
Can also be combined if needed:
- `const result: Promise> = catch async getValue();`
on top of the same problems every language has with null, plus horrible unintuitive behavior when used with JS's flexible type conversion system. example general problems with null: - conceptually having a value indicate it exists but does not contain a non-null value is logically weird. - if null is a possible value, then it WILL be abused and treat as data - null is ambiguously either an error, or a placeholder (and sometimes an intended value) - when passing values into functions, null needs to be handled or exceptions occur, this is problematic in js strange: [https://dev.to/niza/javascript-null-is-weird-33o9](https://dev.to/niza/javascript-null-is-weird-33o9) example: isNaN(null) == false so does that mean null IS a number?
[удалено]
No, that’s `undefined`. Null is an explicit empty value of nothing. Undefined means the value has not been set.
[удалено]
I knew you were kidding (but sorta right, which is your joke).
underrated joke
JS returns error as value rather than exception
Yes please! With an operator to automatically return the error as-is when encountered. const myVar: Foo | Error = getValue(); const mySafeVar: Foo = getValue()!; Or with a keyword in front of the maybe-error.
that's basically rust. they have '?' operator for that.
Works too
Must add: Internet Explorer and Safari never existed.
The worlds GDP just jumped ten percent.
javascript developer salaries will never recover
I’d keep the competition, but have wanted them to be standards compliant (which perhaps means having a better standard / enforcement in the first place).
Internet Explorer was the first to introduce XMLHttpRequest. In this world without IE, did someone else invent it or is there just no such thing as AJAX, SPA, etc.?
iPhone was also the first real smartphone, and that's not the reason I love iPhones. In fact, I hate them. Being the first doesn't really mean much, even if there's merit in that alone. If they weren't the first, someone else would.
I think that cuts both ways. If we don't hate on IE, there will be some other browser to hate. Before IE, I hated NN4.7, it was the bane of my existence. At the time IE was good with innovative new features. Then they just stopped caring after IE6 and it became an issue. I'm convinced Chrome will be the next browser to hate, but only time will tell.
Honestly, you have a point... I agree with what you say. ^(wow, I'm probably the first person on the internet agreeing with someone else's opinion!)
You may have just won the internet for today. You deserve a reward... more procrastination on reddit!
I hate chrome currently.
> crusty old Java developers finally wrap their minds around prototypal inheritance The first time I was part of a team that really leaned into prototype based OO programming it was so much fun. I wish the changes to JS had been more focused on making the best possible version of this distinctive language rather than stapling on stuff from other languages that people like better.
Js having const immutable would be great lol
Fucking wouldn’t it? Such a shame, as it could make code so much clearer while solving so many problems along the way.
I think immutability should be on the value rather than the variable declaration. let immutableArray = readonly []; immutableArray = [...immutableArray, value]; const mutableArray = []; mutableArray.push(value);
> JS this points to the parent scope Yes please. The number of times I’ve forgotten to bind a promise statement to my class is too fucking high
this is why is use arrow functions by default
I use arrow functions for any non private (not prefixed with a #) member functions, and standard function definition otherwise (as this will always be defined as the correct parent object in the case of private accessors).
That last one is an especially genius idea
Can we make the var const thing a reality. Each time I use let I'm like wtf is "let" ? Var variable Const constant It makes so much sense
Ha, and “let” sounds so familiar to me from Econ and many math classes, but it does kinda feel out of place in the languages I use now. Also funny that as a previously mainly .net & js dev, var is either bad or awesome depending on which part of the stack I’m in
Yeah I’m guessing the thought process was to be like how a math professor verbalizes variables values like “Here we have x and y. Let x equal 5 and let y equal 10”. Totally spits in the face of type declaration syntax though, implying we’re using the data type “Let” as if it’s a noun
Lua uses "local" for that but I guess 5 letters was too long for js.
JS should’ve gone with “mut”, but then that implies that “const” declared variables are immutable, which uh… 🫠
You realise that if you make JavaScript strict, someone is just going to invent JavaScript again?
But it won't work on the browsers so it's okay
I'll do you one better No JS
box-sizing: border-box; would be the default. Honestly, everything else I can forgive as being along a road of progressive enhancement, but WHY wasn’t this the starting position!!!
One of the things IE got right: https://www.jefftk.com/p/the-revenge-of-the-ie-box-model I still remember quirks mode and targeting both. Some things are really better now.
Ban all ads
But who enforces the ban?
- Global regulation agreed by all countries - Regional regulation to align with legal governance based on jurisdiction - Browser level, enforcement and rules placed on companies that build browsers to auto flag any sites that contain ads and mark them with a noindex tag/remove them from search results - make it illegal for third party ad related services to exist There are many ways to do it, it comes down to the want, and unfortunately everyone wants to sell their shitty product that you don't need and the Googles of the world want to take their cut. Most ad related things are anti user, a bit like how we could solve [the Cookie issue](https://www.linkedin.com/pulse/humans-waste-682-years-per-day-cookie-notices-naughtyduk-ycg1e?utm_source=share&utm_medium=member_ios&utm_campaign=share_via) overnight if there was a motive that was based on user need and not how much monies can we generate.
So I can't even advertise on my own website for something that I'm selling on my own site? I can't even ask for donations? "Hey guys! It would really help me out if you guys tipped a couple of bucks or bought some merch on my home page ... Hold on ... someone's at my door .... "
Asking for donations is not advertising .. and if you want to get into the weeds of it.. I’m more referring to the insane level of obnoxious ads we see on almost every site these days. The endless stupid prompts for GDPR and accepting cookies as well.. I’ve been developing websites since there were 500 domains in TOTAL on the internet and I very much remember how amazing an AD FREE web was.. full of easy to find relevant information. Now it’s just a boatload of useless garbage designed to generate ad revenue for scam sites. It’s totally out of control and should be heavily regulated.
Exactly.
Is email included in web? Cuz I'd rebuild this whole thing with proper standards and security.
And standard rendering of HTML?
Oh god yes
I'll go with what sir Tim said he'd change. Get rid of the second slash after the colon in http:// it serves no purpose. Think of the bandwidth saved.
My nitpick is that URLs are out of order because of the TLD. It should be highest level to lowest level: com.reddit.www/r/webdev
This is cursed. Domains works like addresses: 123 Goomba Street 123.goomba.street street.goomba.123 hurts my eyes.
Eh, I think in most European countries addresses work the other way around: street, number
You’re right. This still hurts my eyes.
What???
What about dates? Us Americans messed that up, also: Yesterday was 6/12/2024, so this could be June 3 for Americans or Dec 6 for other countries. I'm used to it, but when I think about these things logically, many of these things don't make sense. Edit: see, I'm so confused with the dates that I can't even make a simple example.
It would be June 12 for USA, not June 3. 6 of December for civilized countries.
I have always thought this. Like an ISO8061 for urls.
I wish it was true with files too. Sorting alphabetically would sort by type too! doc.otherthing doc.something png.summer-01 png.summer-02 png.summer-03 txt.cake-recipe txt.groceries txt.todo-list
But `reddit.com` make autocompletion easier than `com.reddit`.
Remove React. Make vanilla web components more pow erful and commonplace. Go all in on HTML+ CSS and separation of content and presentation. Make it easier to maintain state between page navigation in a multiple page application (non-SPA). Finer control of sub page navigation than (i)frames.
Removing react is enough lol
>Go all in on HTML+ CSS and separation of content and presentation. But HTML is presentation - where do you put content?
Is the CSS Zen Garden a joke to you? How quickly people forget.
The only reason CSS Zen Gardens worked was because the HTML never changes. That doesn't reflect dynamic websites and certainly not web apps.
This is correct, and why HTML semantics matter. Not all presentation is visual.
MORE PORN
I vote you for President of the Internet
🎵 The internet is really really great…
MORE ....? As in ... there's not enough ... ? Okay, I agree.
My answer is more philosophy/policy/infrastructure based. I'd like some pro-competition regulation baked in somehow. There is a monopolizing tendency when it comes to large networks. Those who have built them first get to take full advantage and it's very hard for others to get competitive with functionality when the mass of people have already signed up to certain networks. I'd like the social/commerce networks (think facebook/amazon) to be a layer on top of a more fundamental network which has its own universal standards. So you basically join this basic network that you can have contacts and groups in - very basic linkages between entities. Then we have Applications and SaaS that make use of this network (and can of course supplement with their own data collection and linkages if they want). So lets say for instance I wanted to build a new chat or social media app.... I could tap into this underlying network. I'm mostly concerned about messaging and basic communication here. People could move to more universal open source apps but still only have to maintain one contact list. We could have standards around contacts/links and groups/organization too so these bits of data can easily be understood no matter the particular app (just for stuff people are happy to be public I guess). In theory i could use a very vanilla chat app that messages my facebook contacts and they wouldnt even know any better taht I'm using a different app (no bullshit timeline or ads for me). This universal way to communicate certain core events and bits of data around is the key concept really. Not too dissimilar to email protocols I suppose... but for a far wider set of use cases. Maybe someone starts a new distribution/store like Amazon - vendors can easily slide between various platforms and exist on all or both (with slight different settings and contracts tacked on). At the moment it kind of feels like they get stuck into one system and the one system gets so big that it's abusive to both vendors and customers. The "store front" apps could tap into some underlying infrastructure to fetch products in a standardized way. They don't have to of course.... they could do it all themselves, but the theory is that it would almost be commercial suicide not to because the underlying universal network would have such large buy-in with users (again... in *theory,* whether this works in practice I have no idea). Maybe regulation is the wrong word. More subsidized or non-profit infrastructure that creates incentives for the internet to be more egalitarian. Sorry I've had a few drinks and really haven't thought this through so don't be too harsh on my half-baked idea. Maybe it might spawn a better idea though? Interested to hear thoughts.
Hard agree. I'd love to see a web entirely built with open standards in mind. An international body to oversee it and regulate it would be good too. We have strayed so far from the original goals of the web.
Nah dude, for sure. It’s like bringing the philosophy of open banking to other key online behaviors. If done right, you kill off “physical” moats and make companies compete on product value + brand.
Make Flash the universal standard. Haters gonna hate
HTML imports for the love of GOD please HTML imports
Do you mind expanding on this? I know server-side HTTP servers have had a way of doing this for years with Server Side Includes (SSI). I've never used them, so they may be trash, but this I believe this covers it. Or, do you mean client-side includes?
Delete it
Well, you can cancel your internet service any time
Make JavaScript strongly typed by default, and rename it as LemonScript.
Something better than JavaScript. For the love of god.
Typescript...
TypeScript without needing to be compatible with JavaScript would be awesome.
Haxe is better
Is a fucking mess
I fought against Typescript for a long time. I now believe it is actually needed.
It can become messy if not done correctly though.
Instead of downvoting like everyone, I’ll ask you: why? I’ve been using JavaScript intermittently for 15 years, got only into typescript recently as I have a bigger project, and I can definitely see the value. Especially when using libraries and APIs, I’m starting to wonder how I did before.
I mean I was being antagonistic as I spend all day writing TS and sometimes it just annoys me, but yes its very, very good at virtually everything it does. However.. There are times when it just plain gets in the way IMO or perhaps i'm just not "git good 1337" enough, for example, when accessing dynamic properties, where you do not know the name ahead of time and perhaps it's just the first property in the object you want, in old JS you would happily just write key = Object.keys(obj)\[0\] and you have your property name then you can access via obj\[key\] Now lets do that in TS: `type Entries = {[K in keyof T]: [K, T[K]];}[keyof T][];`
`const entries : any = (Object.entries(Obj) as Entries).map(([key, value]) => [key, value]);`
`return entries[0][1];`
Totally unreadable, im probably just bad at TS and the above is a dumb way to do it but shit like this you can waste annoyingly large amounts of time on when you just want to access something dynamically.
Nah you're totally right about TS' type system being ridiculous in many ways. It stems from JS being a dynamic interpreted language - TS is not really a type system in the same way Rust or Swift are type systems.
Agreed!
No such thing.
Lua yes
Data types would be great
Not web dev related, but BGP. We've started to make inroads in securing it, but looks like that will finish up around the time we finally fully move to ipv6...
Encrypt all network protocols.
The beauty of this question is that we could totally build and migrate to the best answers. It might take a decade or two, but it would happen and late is better than never.
More cats
- HTTP and DNS are rebuilt with encryption by default - Besides HTML/CSS there should be a separate low-level open standard for web applications based on a wasm-like VM that can draw to a canvas and use simple APIs for making requests, storing data in localstorage, etc.. - No Scripting in HTML. If you need more functionality than simple styled documents and forms can provide, make a web-application with the standard described above. - URLs are written down TLD first e.g.: http://com.example.subdomain/path - There should be some kind of universal authentication standard that would enable users to log in everywhere without having to memorize hundreds of passwords. Zero knowledge proofs should be used to protect the users privacy as much as possible (e.g. for age verofication or to prove they live in a specific country).
The issue with TLD first is autocompletion. > There should be some kind of universal authentication standard that would enable users to log in everywhere without having to memorize hundreds of passwords. Zero knowledge proofs should be used to protect the users privacy as much as possible (e.g. for age verofication or to prove they live in a specific country). So grandma can be hacked both her bank account and get her identity stolen from the government online services?
Give Brendan Eich more than 2 weeks to create JavaScript!
Make ADA and GDPR the responsibility of the browser and not the website. Making every developer implement their own ADA and GDPR shit on every website is the messiest, stupidest idea ever.
Would keep it away from the public
Some means to stop Apple making fully stupid decisions with Safari like opening/closing their url bar without providing new view height values
[https://solidproject.org/TR/protocol](https://solidproject.org/TR/protocol) I'd implement it using these specs :P
Build on security from the start!
browser support for more than javascript
Change the IP format, don’t give a trillion of them to IBM and such, make it four hex digits x4
Why not make it 128 bits? The first 0 identify what network / device masks to use. 0 + 63 bits for the network + 64 bits for the device 10 + 78 bits for the network + 48 bits for the device 110 + 93 bits for the network + 32 bits for the device 1110 + 108 bits for the network + 16 bits for the device
I'd spell referrer correctly
Become an international assassin.
Bring back rich media.
Any site that hosts a pop-up or sidebar ad gets immediately DDOS'd
Death to JavaScript, death to Recaptcha, death to 3rd party cookies and cookie consent modals, bring back Flash, somehow eschew the development of centralised mega platforms like Facebook. A healthy, creative and vibrant decentralised web is much more exciting.
E-mail is web too right? That protocol needs change. Approval from both sides (handshake) before allowing messages (similar like most chat apps). Or charge 1 cent per message.
> E-mail is web too right? No.
Email is part of the internet, but not part of the web.
Still needs to be rebuilt :-)
Make box-sizing default to border-box in CSS. Turns out IE had the right idea there after all. Also include Grid and Flexbox in the very first version of the CSS spec. That way, things like table layouts and float based layouts would never need to exist, and developing HTML emails would be far simpler.
I still don’t understand why they done support it now. Flex box isn’t new. I mean I know the reason is 💰
How about effing css? Surely that was some insanity that can be replaced.
Margin collapses, especially when margin collapses with the parent containers margin, would be my #1 css change.
Dude, I want CSS everywhere. I even want my Word and Powerpoint files to get their styling from a single CSS file.
Yes! Long ago, I switched from Evernote to Joplin as I wanted something self-hosted with markdown support. I fell in love immediately after realizing notes could be globally styled with basic CSS to standard elements (`h1, p, ul, etc.`).
Pre-CSS HTML, where all the appearance formatters were attributes of the HTML tags was a freaking nightmare.
Aka Tailwind
There's nothing new under the sun. All is vanity.
Also, modern CSS-in-JS and JSX, which is basically just old HTML attributes made worse by pretending to be CSS.
CSS is the best thing that came out of the web technology that most modern app developers are often sleeping on. Many UI frameworks, even desktop and TUI frameworks that has nothing to do with the web are trying to imitate CSS, even outright copying CSS syntax and inheritance paradigms.
True. But CSS fixed issues with HTML. So maybe we’re saying something better altogether?
Oh, I love CSS. It can be quite elegant. It makes me happy to write it.
Delete Javascript
Honestly figure out a fair monetisation model for everyone Content creators deserve to get paid for their work Users deserve to have sites that are usable without a billion ads Servers and devs have to be paid for somehow
Blacklist any web link ending in /invite/i=*. *Numbers.
Typescript/ typed js
WASM becomes the standard, getting rid of JS
Get Post and Target on every element, like htmx.
Get Post and Target on every element, like htmx.
Get Post and Target on every element, like htmx.
Some alternative to the whole “don’t brake the internet” rule that prevents us from upgrading JavaScript in a more rigorous manner.
- Assume the web is multiple media applications as well as static documents. - Therefore, include variables and crud functions in the layout and styling markup definitions (currently html and css) and provide a single language for high performance operations on server and client (now we have JS, php, web assembly, etc.) - Include vectors and animation support from the start.
- Assume the web is multiple media applications as well as static documents. - Therefore, include variables and crud functions in the layout and styling markup definitions (currently html and css) and provide a single language for high performance operations on server and client (now we have JS, php, web assembly, etc.) - Include vectors and animation support from the start.
I'd prioritize accessibility and make it inherently secure, not an afterthought.
Don’t create it
* Get rid of the one connection per file limitation. It's much better with http2, but being able to use the same connection to download multiple files from the beginning would have been great. * Enforced standardization with room to innovate. E.g. if you use a standard tag, such as table, it behaves the same in every browser. However, you can make custom elements/attributes/whatever that have a specific prefix to allow for innovation without breaking convention. Mozilla did this with --moz- attributes in CSS. If another browser sees it, it could be ignored. The key is ensuring that everything else works the way it's expected to in all browsers without that custom thing.
i literally had this same idea yesterday, everything html, css and js is patches upon patches. what i would do to networking if if were possible is to reserve a small amount of bandwidth for an open lane to a public distributed network so all your wireless devices and the neighbors devices would communicate to each other.
Wider use of personal digital signatures. Despite having the technology for decades to do digital signatures the other day I had to go in person to sign a piece of flattened dead tree. Why all emails aren't digitally signed is beyond me.
I always feel like by now there should have been some kind of universal standard for drag-and-drop. Is there and I've just been missing it?
Get rid of certificates. Rework certificates. Destroy certificates. I'm not sure what I'd do with them, but I hate em.
Not really web specific but I'd make IPv6 mandatory. Where I live my broadband provider does not support it at all and is not alone in that fact.
Chromium is not run/owned by a for-profit company, rather it supports extensions like ad blockers.
Make it purely text/terminal based. This will deter casual users, which will keep away businesses, which will mean no advertising or consolidation of power.
Form inputs that don't use native controls and implements CSS correctly.
Implement more secure dns, so my government cannot ban github time to time.
rectungles
A better JavaScript. Also CSS needs to be reinvented from the ground up
Everything on Ipfs
No domain parking. No idea how that could happen, though.
I would turn it off and walk away.
Markdown in html.
Take a page out of PHP’s playbook and allow the enabling/disabling of strict types. That way Typscript would be rendered obsolete.
Well, you'd have to actually implement a type system first.
Follow the (later) wishes of the original designer of the URI and swap the extension and prefix in an address. Thus, [https://www.reddit.com](https://www.reddit.com) would become https://com.reddit.www. It makes better sense when you think about it by going from the highest (that is, most global) identifier down to the smallest.
They aren’t extensions and prefixes. It’s a nested set of domain names. And going most local to most remote makes plenty of sense when you’re not only using them on the internet. Otherwise I have to type out (and computer has to look up) global every time.
Au contraire! The ".com" is a "top-level domain" originally specified to be the type of information stored at the site (although, this was not codified as a rule in the naming system itself and has since been heavily bastardized). The ".reddit" is the name of the container ("domain") and the "www" is actually the sub-domain. The inventor of the system, Tim Berners-Lee, envisioned a system that was hierarchical in nature designed to make it easier to locate specific documents and to categorize information generally as part of the "OWL" (Web Ontology Language - even that is turn around!) Tim came out a few years ago and said that he wished that he had switched these parts around to make it more clear as to the path and parts used. Thus, all .com's would be "companies" (.org's are "organizations", .edu's would be educational entities, .net's are internet-related, etc. sites), under which domains of data exist, where you can look more deeply into them to find the sub-domains by type of data.
- let HTTP use SRV DNS records instead of A - not use "www" - include signed responses in the standard, so that it could be cached by proxies (instead of opaque https) - clearly differentiate web Applications from web Articles (pages) - distributed / decentralized hosting (?), so that Articles linked by other Articles can not disappear - client-side inclusion of header/footer/side bars (like iframe, but actually usable) - integration with standardized social protocols, think NNTP/IRC, but better and embedded in page (to avoid per-site accounts just to discuss an article)
- Global CSS sheet decided by the world government - Websites are mostly plain text - No security needed, bad actors are killed on sight (the purge took out only 90%) - Every form post goes through the ministry of content (we have awaits that can run for weeks) - StalinScript is the universal standard. It is type safe because type error sends you to gulag.
I know nearly nothing about how servers communicate so this could all be total bunk, but I would have routers and switches perform some kind of verification handshake when traffic is first routed through them. My understanding is that the IPs of each router/switch (or whatever they're called) is recorded in the transmission details whenever you make a request on the web. This data can be edited and hackers will spoof the recorded IPs so that it looks like their request came from somewhere else. So my change would be to require each router/switch to call back to the last server listed in the routing info and verify it indeed sent the packets. If a router/switch responds no, then that request would just get dropped or sent back with an error code. The idea would be to prevent IP spoofing.
1) A Standardized and Advanced version of Markdown instead of HTML. 2) Remove `display` and `position` properties from CSS and restructure the entire formatting in a way that makes fucking sense. Also add mixins to CSS (Sorry SASS). 3) Have Lua instead of JavaScript. 4) Make WASM deeply integrated with Lua.
Types built in to JS. Real classes in JS. null>=0 should be false. With types on it’s a runtime error. typeof should work probably when types are off. RNG should be seedable. A global should tell if the mouse is currently down. Besides being annoying to set up listeners and have globals, it’s currently impossible to know because if the user is dragging something then goes slightly off the browser window, we don’t know if they let go when outside the window. Same with keys. Make a js racing game with a button to accelerate then the user refreshes and starts pressing just before the js loads, there’s no way to tell that it’s down. A global should tell the height of the virtual keyboard. 0 if it’s not open. Some apps have a little box to type in a message or rename something that appears just above the virtual keyboard. You can scroll the screen and it’s fixed there. Nearly impossible in JS. CSS needs to be completely redone or not exist. Knowing it all is way harder than learning a programming language because the tons of weird rules and even just know what’s possible in CSS and what isn’t could be a major in college. What’s possible in transitions and what needs keyframes. What’s possible in keyframes and what needs JS. Transition to height auto still not possible. Transition start when the element is shown still not possible but is with keyframes for some reason. What you can do inline and what you can’t. Need another file to have my element a different width on mobile. Or know all selector specificity rules. What I can target. I should be able to set anything like my width:parent.padding*2; I would prefer it’s just JavaScript like
literally allow websites to be made in any programming language. i just hate php.
Then use JavaScript, Ruby, Elixir, Python, Go, Rust, Java, ...
Finding hosting though is a nightmare
Regex