That's an assumption. How do you infer that from written text? I can not infer that.
To me it is super-strange that one uses AI to come to the conclusion that language x is better than language y. In the past people spent some time using both languages for a while, before reaching any conclusion. With AI it seems insta-gratification or insta-evaluation now. I am beginning to see why Google ruined its search engine for real humans - those who control AI rule the world now. People aren't even noticing this how dependent they are becoming on AI in general.
My experience tells me. You are disagreeing with me, but you don't give negative vibes in your comment. The other comment sounded too negative:
<< I lost all interest >> << why would I bother >> << putting any thought into it >>
It could have been worded neutrally and still convey the same points of disagreement. Interestingly, look at their other comments, they are all contentious.
I was also experimenting psychologically, to see what reactions I would get.
the same will apply to software. You just wait and see the day when disclaimers like 'No AI involved' would be a signal of high quality, especially for software on which lives depend.
Kotlin has the combination of JVM ecosystem, overall good performance and agents are good at writing it. I'd argue that it's a better default choice to reach for when working on non-frontend code than Go, though Rust and Python still have use cases.
Haha thanks. Funny thing is, I’ve been a long time Python fan, learning it in 2001 and using it extensively for a long time. But then I learned Clojure, Typescript, and recently Rust and I’ve found Python to be quite flawed. But it sure does have a cult following.
:) I use Python as well-- so i am not anti-Pythonic in any strict sense. However, I don't like culltification of technology, be it Python or whatever else. Have you tried F#? It gave me a very good experience.
Only briefly for fun (and OCaml too but very long ago). F# does seem like a language I feel I could really like, though.
I’ve tinkered a little in Gleam and Elixir too. Elixir was incredibly enjoyable, and Gleam is a wonderful language that I wish I could work with more, but I don’t really have a use case for it and nobody will pay me to write it…
Back in 2009, I also spent a few months playing with Factor (before switching to Clojure because despite Clojure being niche, Factor was even more so). It was an interesting and somewhat mind bending experience.
function Greeting({ name }: { name: string }) {
return (
<div class="card">
<h1>Hello, {name}!</h1>
<p>Welcome to my site.</p>
</div>
);
}
That looks like HTML, but it's TypeScript. It gets compiled to actual HTML. Can any Python framework do that??
In Python, you'd typically write your logic in Python and your HTML in a separate Jinja2 template file — two languages, two files, context-switching. With Fresh + TSX, your logic and your markup live together in one .tsx file, both in TypeScript, with full type-checking throughout.
No, that is not TypeScript. That's TSX. If you don't happen to have react, preact or a similar front end library, and a appropriate bundler, it is invalid TypeScript.
> That looks like HTML, but it's TypeScript. It gets compiled to actual HTML. Can any Python framework do that??
IMHO that's a terrible idea that no one should ever actually use, but if you are really in love with that, you can have it:
> If you don't happen to have react, preact or a similar front end library, and a appropriate bundler, it is invalid TypeScript.
Not true, you can compile it to HTML on the backend or even statically too.
It's not a terrible idea; it's actually amazing. One of Typescript's best features. I do agree at first it seems icky (reminds me of Qt's MOC) but in practice it's fantastic. I recommend you try it before criticising. Python has nothing close (nor do any other languages tbf).
> It's not a terrible idea; it's actually amazing.
You got it wrong, the terrible idea is `pyxy-org/pyxy`
>> invalid TypeScript.
> If you don't happen to have react, preact or a similar front end library, and a appropriate bundler, it is invalid TypeScript.
> Not true, you can compile it to HTML on the backend or even statically too.
I had to test your assertion that it compiles to HTML. I remember it being very invalid typescript without react scafolding. So I tested it without the react scafolding:
# mise use node@24
# echo '{}' >package.json
# npm i --save typescript
# echo 'function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
' >hello.tsx
# : a test to check if we have a working typescript compiler
# tsc hello.tsx
error TS5112: tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.
# echo '{"compilerOptions":{"jsx":"react"}}' >tsconfig.json
# tsc
hello.tsx:1:58 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~~~~~~~~~~~~~~~~~~
hello.tsx:1:59 - error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~~~
hello.tsx:1:77 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~~~~
hello.tsx:1:78 - error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~~
hello.tsx:1:95 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~~~~~
hello.tsx:1:101 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~~~
hello.tsx:1:102 - error TS2874: This JSX tag requires 'React' to be in scope, but it could not be found.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~
hello.tsx:1:123 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~~~~
hello.tsx:1:128 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
1 function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }
~~~~~~
Found 9 errors in the same file, starting at: hello.tsx:1
# cat hello.js
function Greeting({ name }) { return (React.createElement("div", { class: "card" }, " ", React.createElement("h1", null, "Hello, ", name, "!"), " ", React.createElement("p", null, "Welcome to my site."), " ")); }
# : sanity check
# mise use deno
# deno hello.tsx
# : no output
# echo 'function Greeting({ name }: { name: string }) { return ( <div class="card"> <h1>Hello, {name}!</h1> <p>Welcome to my site.</p> </div> ); }; Greeting({ name: "world!" });' >hello2.tsx
# deno hello2.tsx
error: Uncaught (in promise) ReferenceError: React is not defined
at Greeting (file:////hellotsx/hello.tsx:1:49)
at file:////hellotsx/hello.tsx:1:141
Where is my static HTML? Oh, that requires react I guess.
reply