You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goto() function has always felt off to me. Here's why I think the name causes more harm than good:
goto isn’t even a real word – it’s a mashup of "go to" mostly seen in old-school programming languages. It doesn’t clearly describe what the function actually does.
For experienced developers, the name carries historical baggage. In languages like C and BASIC, goto is something you’re explicitly told not to use. Seeing it as the client routing method in a frontend framework just feels wrong.
For newer developers, the meaning isn't obvious. A junior I worked with once assumed it had something to do with scrolling – and honestly, that confusion makes sense. The name doesn't communicate navigation clearly.
It overlaps with Playwright’spage.goto(), which refers to full page reloads. When working in projects that use both SvelteKit and Playwright, this can cause real confusion. And while Playwright’s naming may not be ideal either, the collision doesn't help.
The name even breaks consistency inside SvelteKit. You already have beforeNavigate and afterNavigate – both descriptive and intuitive. Then suddenly, for actual navigation, it’s just goto()? That’s inconsistent and jarring..
Semantically, goto feels too abrupt. It reads like a low-level control-flow jump, not like part of a smooth, user-driven route transition. Navigation is not usually a "jump"; it's part of an interaction flow.
The name feels like it was chosen to be clever or different – and sometimes that works – but in this case, it sacrifices clarity.
Naming may seem like a small issue, but it significantly impacts:
Onboarding for new team members
Communication across teams
Code readability and maintenance
Overall developer experience
Now, English isn’t my first language — but that’s exactly the point. A good name should feel clear and intuitive to everyone, not just to native speakers or people with specific programming backgrounds. If I have to stop and think about what it means, that friction is real — and I’m probably not the only one feeling it.
Anyway, thank you for all the incredible work on Svelte — truly. This isn’t criticism for the sake of it, but a small push toward a bit more clarity, consistency, and a smoother experience for everyone!
Maybe I’m overthinking. Or maybe I’m just thinking — because names matter more than we think.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The
goto()
function has always felt off to me. Here's why I think the name causes more harm than good:goto
isn’t even a real word – it’s a mashup of "go to" mostly seen in old-school programming languages. It doesn’t clearly describe what the function actually does.For experienced developers, the name carries historical baggage. In languages like C and BASIC,
goto
is something you’re explicitly told not to use. Seeing it as the client routing method in a frontend framework just feels wrong.For newer developers, the meaning isn't obvious. A junior I worked with once assumed it had something to do with scrolling – and honestly, that confusion makes sense. The name doesn't communicate navigation clearly.
It overlaps with Playwright’s
page.goto()
, which refers to full page reloads. When working in projects that use both SvelteKit and Playwright, this can cause real confusion. And while Playwright’s naming may not be ideal either, the collision doesn't help.The name even breaks consistency inside SvelteKit. You already have
beforeNavigate
andafterNavigate
– both descriptive and intuitive. Then suddenly, for actual navigation, it’s justgoto()
? That’s inconsistent and jarring..Semantically,
goto
feels too abrupt. It reads like a low-level control-flow jump, not like part of a smooth, user-driven route transition. Navigation is not usually a "jump"; it's part of an interaction flow.The name feels like it was chosen to be clever or different – and sometimes that works – but in this case, it sacrifices clarity.
Naming may seem like a small issue, but it significantly impacts:
Now, English isn’t my first language — but that’s exactly the point. A good name should feel clear and intuitive to everyone, not just to native speakers or people with specific programming backgrounds. If I have to stop and think about what it means, that friction is real — and I’m probably not the only one feeling it.
Anyway, thank you for all the incredible work on Svelte — truly. This isn’t criticism for the sake of it, but a small push toward a bit more clarity, consistency, and a smoother experience for everyone!
Maybe I’m overthinking. Or maybe I’m just thinking — because names matter more than we think.
Beta Was this translation helpful? Give feedback.
All reactions