As a practicing Muslim, yup I have no love for the Saudi regime (same with the Iranian regime, Taliban, etc.).
That being said you'll find a variety of opinions with the Muslim community both from Saudi and non-Saudi Muslims.
I imagine my relationship with KSA is similar to how some if not many US Jews feel with Israel. Just like I have an emotional attachment to Mecca and Medina which is currently under Saudi control I can understand how those among the Jewish diaspora may have an emotional attachment to Israel or believe in principle jewish self determination even when they vehemently oppose the government or have reservations about the modern state.
I sometimes do this but idk if I would consider it 'elegant'
The other 'gotcha' is that in switch statements the compiler can't tell whether you enumerated on all your cases as there is no true enum type so it's not uncommon to have a catch all default case that either returns an error or panics and hope you can catch it during tests if you missed a case.
Enums + Payloads + switches are incredibly simple yet so effective. You can make a simple state object, isolate it with an actor, then stream it anywhere with Combine (or now Observability). You'll get full compiler safety too, forcing any new state to be handled everywhere.
You can even stack that with _generic_ payloads that conform to protocols, and if you're feel brave you can make those payloads equable completions for _typed returns_.
for example (I hate formatting on here, but I'll give it a shot)
// A user state enum that conforms to loggable.
// The state is generic, any object T that conforms to "Partner" protocol can be a partner
enum UserState<T: Partner>: Loggable {
// Your states
case loggedOut(error: String?)
case loggingIn(email: Email) // Email type is a string that's been validated
case loggedIn(authToken: String, user: User, partner: T)
case loggingOut(exampleBlock: (String) -> Bool) // You can embed a callback here
// Utility Functions
/// Is the user logged in?
func isLoggedIn() -> Bool {
switch self {
case .loggedOut, .loggingIn: return false
case .loggedIn: return true
}
}
/// Loggable conformance
func logText() -> String {
// switch that converts state into something that's safe for your logging service
}
}
In the above, any subscriber that gets a UserState object can switch on it, and for example if you're logged in you 100% get the auth token, user, etc. It's impossible to be logged in without those in-context.
It might look something like this in your UI:
/// Called by a subscriber that's hooked in to the state stream
func onUserStateChanged(newState: UserState) {
switch newState {
case let .loggedOut:
// Impossible? Error UI
case let .loggingIn, .loggingOut:
// loading UI
case let .loggedIn(authToken: _, user: user, parner: partner):
// set some text "hello \(user.userName)"
// display an image: \(MyRemoteLoader.url(url: partner.primaryLogoURL))
// Button to website: Button(url: partner.homePageURL)
}
}
add a new state later? The compiler will error in the 500 places in your codebase you didn't handle the new case with one build command.
Love this. Not only is it my favorite feature of swift, but I often say swift enums are my favorite feature of any programming language. They are just so elegant and powerful
This is literally me. It is a math program that can evaluate equations and generate code. 6 layers of heterogeneous data structure which the math operation being act on 1st layer has its effect down to 6th layer. Temporarily using *kwargs to make it works but still thinking what is the proper way to do it right.
There's no central authority in Islam like the clergy in Catholism.
However there are legal schools and councils that people trust. Legal schools (or fiqh) were established by famous scholars that nearly everyone recognizes as an expert and were carried on by their students.
From a political standpoint, a lot of Muslims defer to Saudi Arabia because they are the current caretakers of Mecca and Medina.
But generally speaking for everyday normal Muslims they go with whatever their local imam says and go with whatever method the imam used because they are usually the most knowledgeable person around on such matters.
Islamic tradition values reason and rationality. It doesn’t say to blindly follow stuff. You still have to reason through new situations. The Quran is more for spiritual guidance even though it has some prescriptions. But most of the "rules" come from hadiths or the prophetic tradition which has been passed down orally before it was compiled into books by famous scholars.
For example, the Quran says to pray but doesn't spell out how to pray. We learn how to pray from the hadith. Same thing with fasting. The Quran just says fast like Abraham fasted but it doesn't spell what that was. So we follow the way the Prophet did and he's human - he probably wasn't thinking how it would affect people in higher latitudes. He doesn't have supernatural powers or foresight. We say he's the best of us within human limits. Hence why there's a rich scholarly tradition to work these edge cases. It's also why we traditionally break our fast with dates because that's how the prophet did it. But the choice of dates is pretty arbitrary. There's nothing inheritly special about it. It's a staple food in the middle east so it's what he had access to. If the prophet lived in east Asia, then he probably would have broke his fast with rice and then that we would be the thing we break our fast with.
Also the Quran is not like other texts when it comes to structure. It was "revealed" (or authored for the non-religious) over a span of 20+ years and usually in response to something that happened. It's really more a dialogue between god and the prophet and his companions in response to events (someone is being mean or trying to kill them) or if they need guidance or reassurance on something. That's why sometimes taking verses literally is often wrong.
Of course it's not! It must be comfortable for farmers, and the farming season starts just now. I'm not a religious but I respect Islam as the most wise of religions, like an iPhone among other cell phones. I want to try fastening because I see some wisdom in having a month with feeding like that and I consider these days of year as totally not arbitrary.
I meant breaking your fast with dates is kinda arbitrary not the fasting itself. Fasting is very much not arbitrary and has a very special meaning since it's one of the few things we do solely for God and God alone. Also you can fast outside of Ramadan as well and get additional blessings from it. The prophet would routinely fast on Mondays for example. I think the only days you are not allowed to fast on is Eid because it's a time for celebration.
There's no rule that says you _have_ to break your fast with dates. We just do because that's how the prophet usually did it. Dates have no inherit religious significance. I eat them throughout the year because they are delicious and have nutritional benefits and there's some baraqah (wisdom) in things turning out this way. Also when it comes to farming dates are often harvested in late fall/early winter that's when they are juiciest so we just missed the window but also Ramadan rotates around the seasons due to being on the Lunar calendar. But there are different kinds of dates and you can dry them and they last on long time without spoiling. A very useful property when you live in a desert hence why it's such a common fruit there.
Even when the prophet didn't have access to dates, he would break it with water or yogurt, or even just salt instead. Whatever he has access to at the time.
Yea and as a Muslim - I view it more as practicing discipline rather than suppressing desires. Like one the other posts said, you can't be blamed or sinned for having desires or whatever thoughts you have in your head. If we were, then basically no one is getting into heaven. And for some desires, Islam offers ways to fulfill them in a way that it views as permissiable. Whether or not you buy that ultimately comes down to faith but that's a separate topic.
Notice how imams are not celibate like Catholic priests. In fact celibacy isn't even a thing in Islam. You're actively encouraged to get into a relationship and get married so you can fulfill your sexual desires. There's even a prophetic quote that says getting married is half of your religion. It's that important. Of course some things like drinking is not allowed even if you desire it and that's just something you have to deal with. But even if you cave it's not the end of the world because the grading system is heavily curved in your favor.
Having desires is natural and human and it's even ok to indulge in them every once in a while in a healthy way.
The Islamic term for this is nafs which means "self" or sometimes "ego". So fulfilling human desires is filling your nafs. But just like overfilling your stomach can be bad, overfilling your nafs is also bad so you need to practice discipline in not getting carried away.
That being said you'll find a variety of opinions with the Muslim community both from Saudi and non-Saudi Muslims.
I imagine my relationship with KSA is similar to how some if not many US Jews feel with Israel. Just like I have an emotional attachment to Mecca and Medina which is currently under Saudi control I can understand how those among the Jewish diaspora may have an emotional attachment to Israel or believe in principle jewish self determination even when they vehemently oppose the government or have reservations about the modern state.