this post was submitted on 16 Jun 2024
127 points (97.7% liked)
Python
6394 readers
1 users here now
Welcome to the Python community on the programming.dev Lemmy instance!
π Events
Past
November 2023
- PyCon Ireland 2023, 11-12th
- PyData Tel Aviv 2023 14th
October 2023
- PyConES Canarias 2023, 6-8th
- DjangoCon US 2023, 16-20th (!django π¬)
July 2023
- PyDelhi Meetup, 2nd
- PyCon Israel, 4-5th
- DFW Pythoneers, 6th
- Django Girls Abraka, 6-7th
- SciPy 2023 10-16th, Austin
- IndyPy, 11th
- Leipzig Python User Group, 11th
- Austin Python, 12th
- EuroPython 2023, 17-23rd
- Austin Python: Evening of Coding, 18th
- PyHEP.dev 2023 - "Python in HEP" Developer's Workshop, 25th
August 2023
- PyLadies Dublin, 15th
- EuroSciPy 2023, 14-18th
September 2023
- PyData Amsterdam, 14-16th
- PyCon UK, 22nd - 25th
π Python project:
- Python
- Documentation
- News & Blog
- Python Planet blog aggregator
π Python Community:
- #python IRC for general questions
- #python-dev IRC for CPython developers
- PySlackers Slack channel
- Python Discord server
- Python Weekly newsletters
- Mailing lists
- Forum
β¨ Python Ecosystem:
π Fediverse
Communities
- #python on Mastodon
- c/django on programming.dev
- c/pythorhead on lemmy.dbzer0.com
Projects
- PythΓΆrhead: a Python library for interacting with Lemmy
- Plemmy: a Python package for accessing the Lemmy API
- pylemmy pylemmy enables simple access to Lemmy's API with Python
- mastodon.py, a Python wrapper for the Mastodon API
Feeds
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I realise that C can be rather low level a lot of the time, but I'm not sure I'd pick C++ to help keep things easy to maintain. It opens up a Pandora's box of possibilities.
With a good style/best-practice guide, C++ can be quite productive of a language to work with.
Those kinds of guides typically define which standard/convention to use and which features not to use (cough exceptions cough).
I highly recommend Google's C++ style guide: https://google.github.io/styleguide/cppguide.html.
You accidentally added a dot at the end of the link. Here's the fixed one https://google.github.io/styleguide/cppguide.html
I intentionally added a period because it was the end of a sentence.
If your Lemmy app messed it up, then that's a bug in its markdown parser.
I'm curious about this. The source text of your comment appears that your comment was just the URL with no markdown. For your comment about a markdown parsing bug to be true, shouldn't the URL have been written in markdown with
[]()
notation (or a space between the URL and the period) since a period is a valid URL character? For example, instead of typinghttps://google.github.io/styleguide/cppguide.html.
, should[https://google.github.io/styleguide/cppguide.html.](https://google.github.io/styleguide/cppguide.html)
have been typed?Huh. This got me curious.
Yes, I did just type a bare URL. Every mature markdown parser I've used turns this into a link, and appropriately handles trailing punctuation.
So I went to the spec, and it's explicitly called out that this is not an autolink. Autolinks must be explicitly surrounded with angle brackets
<>
.So yeah \shrug.
https://spec.commonmark.org/0.31.2/#autolinks
Edit to be clear: This means that both of our markdown parsers are wrong relative to the commonmark spec. But I'll argue that if a parser is going to attempt to autolink this, then handling trailing punctuation is better than not.
I did not know about autolinks - thanks for the link!
It is interesting how different parsers handle this exact situation. I usually am cautious about it because I typically am not sure how it will be handled if I am not explicit with the URL and additional text.
Do you think a style guide is enough for an open source code base? Contributions could be coming from lots of directions, and the code review process to enforce a style guide is going to be a lot of work. Even rejecting something takes time.
This kind of thing can be easily automated nowadays. Itβs not really a problem.
Yup, we do it for Python and Javascript at work, and I do it on my Rust projects (and my older C projects). I don't see why C++ should be any more difficult.
Honestly, I prefer C to C++ anyway. If they're going to switch to something, I'd prefer Rust.
But whatever, not my project, not my concern.