6 ms·
We don't see ourselves as Python bindings for the web, but instead as a pythonic way to create apps. I understand that "span" has become a well known name among
by Sn3llius 2y ago
We don't see ourselves as Python bindings for the web, but instead as a pythonic way to create apps. I understand that "span" has become a well known name amongst web developers, that's just not something most new developers understand.
Think of it like how Python has renamed a lot of things. What other languages call arrays, Python calls lists. HashTables are dicts, and so on. Python has faced a lot of resistance here from people that got used to the more technical names, but I think the popularity of the language speaks for itself. Easy to understand, meaningful names are a plus, not a downside :D
- jonkoops 2y ago> that's just not something most new developers understand. That is just false if you ask me. Eventually you reach the limits of the API defined by a framework and users will have to reach out to HTML and CSS. And now is there not only a level of indirection, but also all of the existing documentation from the Web Platform cannot be applied. I think there is validity for having a Python based system (instead of JS) that runs on the client to render standard HTML and CSS, but this goes beyond that and will just become an immense scope creep.
- dumbo-octopus 2y agoWhat connection do you think span has to text? To me, span is just the grouping element that defaults to display: inline. This can be used for text, but it can be used for about a million other things too. To me this looks like a fast path to a lot of docs that say “We aren’t actually putting any text in this element, but for legacy reasons it’s called Text. Version N+1 will rename it to Inline”.
- bee_rider 2y agoPython lists aren’t arrays, right? They are the closest thing in Python to an array maybe, but they do a ton of stuff under the hood, like grow when needed. Calling them arrays would be very confusing to everybody who expects a typical array: a pointer with some empty space after it.
- Phrodo_00 2y agoYeah and no? Python Lists indeed don't make any sort of array-like guarantee, but they're implemented as a vector/autogrowing-array of python object references (but these objects are not guaranteed to be cache-local). The implementation defines the underlying data structure as PyObject *ob_item
- Sn3llius 2y agoList access is O(1), which effectively makes them arrays :)
- Phrodo_00 2y agoMaybe if you don't consider CPU architecture, but most would expect to be able to do loops over Arrays that don't incur in a lot of cache misses, and Python Lists don't do that, since they're actually arrays of pointers to heap memory.
- Sn3llius 2y agoMost languages have arrays that grow automatically. I'd say C/C++ is the exception there. When I said array, I specifically meant O(1) access, which is in contrast to linked lists, which the name "list" would seem to imply.
- pjmlp 2y agoC++ has them on the standard library, I would make a clear split with C in this regard.
- mixmastamyk 2y agoA list is not an array. Each item is a pointer to what could be any type. There’s an array module if that’s what is needed.